aboutsummaryrefslogtreecommitdiff
path: root/src/threading.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fix on_state_create circular logic issueBenoit Germain2014-01-061-2/+2
| | | | | | * if config.on_state_create() is a C function, call it by direct C closure reconstruction in newly created states * bumped version to 3.7.6
* new API lanes.set_thread_priority()Benoit Germain2013-12-041-41/+67
|
* pthread thread priority refacto: threading.cBenoit Germain2013-12-021-216/+212
|
* Fix a macro checkBenoit Germain2013-11-291-1/+1
|
* supposedly improved pthread supportBenoit Germain2013-11-291-1/+11
| | | | | | | | | * bumped version to 3.7.3 * set pthread thread cancel type to PTHREAD_CANCEL_ASYNCHRONOUS * lane_h:cancel() accepts a 3rd timeout argument used when waiting for actual thread termination (hitting the timeout raises an error) * added PROPAGATE_ALLOCF macro to select state creation mode (lua_newstate or luaL_newstate)
* MinGW-pthread supports -3/+3 thread priority range, so accept it API-side tooBenoit Germain2013-11-221-0/+7
|
* Correct MinGW pthread_attr_setschedpolicy replacement.Benoit Germain2013-11-211-2/+2
|
* Add a dummy pthread_attr_setschedpolicy() for MinGW builds to fix a ENOTSUP ↵Benoit Germain2013-11-211-0/+17
| | | | failure.
* Ignore ERROR_WAIT_NO_CHILDREN issued by WaitForSingleObjectBenoit Germain2013-11-161-4/+8
| | | | ERROR_WAIT_NO_CHILDREN means a thread was killed (lane terminated because of error raised during a linda transfer for example) while having grabbed some mutex this seems not to be a big problem as we will grab it just the same, so ignore this particular error
* version 3.7.0Benoit Germain2013-10-111-2/+3
| | | | | | | | | | | | * fix lanes.threads() not being available in a lane where lanes.configure() settings didn't contain track_lanes although the initial configure() call did. * require "lanes".configure() sequence is only necessary at the first require "lanes". * fix a crash at application shutdown where in some situations we could deinitialize the protected allocator mutex while a lane was still using it. * fix timers broken by change 69
* Ditch PulseEvent usage on WIN32 buildsBenoit Germain2013-07-201-68/+87
|
* version 3.6.2Benoit Germain2013-05-201-0/+65
| | | | | * WIN32 builds use condition variables instead of PulseEvent() when available. * first steps toward fixing make-vc.cmd
* version 3.5.1v3.5.1Benoit Germain2013-02-131-8/+13
| | | | | | | * new lanes.h header and API call luaopen_lanes_embedded() for embedders * "lanes.core" is an acceptable library in the generator libs argument * library "*" wildcard also opens lanes.core * tweaked code for Xbox 360 build
* Copyright notice updateBenoit Germain2012-12-121-1/+2
|
* Use prctl when pthread_setname_np isn't availableBenoit Germain2012-11-271-1/+18
|
* build fixesBenoit Germain2012-10-201-1/+1
|
* minor internal changesBenoit Germain2012-09-131-2/+50
| | | | | | * implemented set_debug_threadname() for pthread builds where possible * refactored linda __tostring and __concat * linda metatable's __metatable is a string instead of a boolean
* code tweaks to enable building against win32-pthread on windows platforms.Benoit Germain2012-09-111-12/+24
| | | | not active by default, see threading.h.
* more explicit error code when THREAD_WAIT fails.benoit-germain2012-06-251-1/+1
|
* * removed packagepath and packagecpath options, replaced by a package table, ↵Benoit Germain2011-11-141-28/+26
| | | | | | | whose fields path, cpath, loaders, preload are transfered * code cleanup to facilitate transition between WIN32 and PTHREAD impleentations * tentative fix for desinit crashes when free running lanes are killed at process shutdown
* some more compilation warning fixesBenoit Germain2011-11-091-0/+1
|
* * fix all compilation warnings raised by -WextraBenoit Germain2011-11-071-2/+4
| | | | * fix a multithreading issue at desinit causing invalid memory accesses (to be verified)
* * process exit change: close everything at GC when main state closes, not ↵Benoit Germain2011-11-051-0/+1
| | | | | | | | | | | | | | | | | | | | when atexit() handlers are processed * Lua 5.2-style module: * module() is no longer used to implement lanes.lua * a global "lanes" variable is no longer created when the module is required * the Lanes module table is returned instead * Lanes must be initialized before used: * the first occurence of 'require "lanes"' produces a minimal interface that only contains a configure() function * the remainder of the interface is made available once this function is called * subsequent calls to configure() do nothing * configure() controls the number of keeper states and the startup of timers * LuaJIT 2 compatibility * non-Lua functions are no longer copied by creating a C closure from a C pointer, but through 2-way lookup tables * this means that if a lane function body pulls non-Lua functions, the lane generator description must contain the list of libraries and modules that exports them * introduces a change in configuration .globals management: contents are copied *after* std libs are loaded * new .required configuration entry to list modules that must be require()'ed before lane body is transferred * lane:cancel() wakes up waiting lindas like what is done at lane shutdown
* Take all code from Asko Kauppi's SVN server, and push it here so that the ↵Benoit Germain2011-01-041-2/+7
| | | | | | | | | | | | github repository becomes the official Lanes source codebase. Note that Asko's SVN server holds version 2.0.9, whereas this is version 2.0.10, but I don't see any real need to update SVN if it is to become deprecated. Next steps: - upgrade the rockspec to the latest version - make the html help available online somewhere Signed-off-by: Benoit Germain <bnt.germain@gmail.com>
* Import to gitPeter Drahoš2010-10-011-0/+721