aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenoit Germain <bnt.germain@gmail.com>2013-11-22 09:45:59 +0100
committerBenoit Germain <bnt.germain@gmail.com>2013-11-22 09:45:59 +0100
commit4120f7a75b59508f635646582d43f80f29631cdd (patch)
treeaf8a32902f19ee25298826989f78a7870af92690 /src
parentb949404dd90ae944017eb9b875a5920b747bb25d (diff)
downloadlanes-4120f7a75b59508f635646582d43f80f29631cdd.tar.gz
lanes-4120f7a75b59508f635646582d43f80f29631cdd.tar.bz2
lanes-4120f7a75b59508f635646582d43f80f29631cdd.zip
Added a comment in thread_new()
Diffstat (limited to 'src')
-rw-r--r--src/lanes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lanes.c b/src/lanes.c
index feccb75..41b097c 100644
--- a/src/lanes.c
+++ b/src/lanes.c
@@ -1946,7 +1946,7 @@ LUAG_FUNC( thread_new)
1946 char const* libs = lua_tostring( L, 2); 1946 char const* libs = lua_tostring( L, 2);
1947 int const on_state_create = lua_isfunction( L, 3) ? 3 : 0; 1947 int const on_state_create = lua_isfunction( L, 3) ? 3 : 0;
1948 uint_t cs = luaG_optunsigned( L, 4, 0); 1948 uint_t cs = luaG_optunsigned( L, 4, 0);
1949 int prio = (int) luaL_optinteger( L, 5, 0); 1949 int const prio = (int) luaL_optinteger( L, 5, 0);
1950 uint_t glob = lua_isnoneornil( L, 6) ? 0 : 6; 1950 uint_t glob = lua_isnoneornil( L, 6) ? 0 : 6;
1951 uint_t package = lua_isnoneornil( L,7) ? 0 : 7; 1951 uint_t package = lua_isnoneornil( L,7) ? 0 : 7;
1952 uint_t required = lua_isnoneornil( L, 8) ? 0 : 8; 1952 uint_t required = lua_isnoneornil( L, 8) ? 0 : 8;
@@ -1954,6 +1954,8 @@ LUAG_FUNC( thread_new)
1954#define FIXED_ARGS 8 1954#define FIXED_ARGS 8
1955 uint_t args = lua_gettop(L) - FIXED_ARGS; 1955 uint_t args = lua_gettop(L) - FIXED_ARGS;
1956 1956
1957 // public Lanes API accepts a generic range (-3/+3 for windows and MinGW-pthread, -2/+2 for the rest of the world)
1958 // that will be remapped into the platform-specific scheduler priority scheme
1957 if( prio < THREAD_PRIO_MIN || prio > THREAD_PRIO_MAX) 1959 if( prio < THREAD_PRIO_MIN || prio > THREAD_PRIO_MAX)
1958 { 1960 {
1959 return luaL_error( L, "Priority out of range: %d..+%d (%d)", THREAD_PRIO_MIN, THREAD_PRIO_MAX, prio); 1961 return luaL_error( L, "Priority out of range: %d..+%d (%d)", THREAD_PRIO_MIN, THREAD_PRIO_MAX, prio);