aboutsummaryrefslogtreecommitdiff
path: root/src/keeper.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* C++ migration: changed file extensions from .c to .cppBenoit Germain2024-03-191-825/+0
|
* Minor tweaksv3.16.1Benoit Germain2023-08-161-1/+1
|
* new .internal_allocator configuration IUNTESTED)Benoit Germain2023-08-091-16/+4
| | | | new configuration option .internal_allocator to help LuaJIT users. THIS IS YET UNTESTED, USE AT YOUR OWN RISKS.
* moonjit supportBenoit Germain2022-03-091-6/+6
|
* Make allocator threadsafe by default when running LuaJIT, because LuaJIT ↵Benoit Germain2022-02-211-8/+8
| | | | allocator is not
* use malloc/free for keeper control structure when compiling for LuaJITBenoit Germain2022-02-211-6/+18
|
* Changed all indentations to all whitespacesBenoit Germain2022-02-071-604/+604
| | | | Tabs mess up alignment of stack contents comments, so I'm done with them.
* correctly transfer the uservalue of a deep userdataBenoit Germain2021-06-241-0/+1
|
* Lua 5.4 supportBenoit Germain2018-11-271-5/+8
|
* protect_allocator configure option is gone, long live allocator (more ↵Benoit Germain2018-11-251-1/+1
| | | | embedders-friendly)
* Internal code tweaksBenoit Germain2018-11-191-16/+18
| | | | | | * Registry access code utility macros * CONFIG_REGKEY and LOOKUP_REGKEY are now lightuserdata instead of strings * Stack checking debug macros improvements
* Deep userdata must embed DeepPrelude to save an allocation (also changes ↵Benoit Germain2018-11-151-1/+1
| | | | Deep protocol)
* fix a bunch of compilation warnings (issue #157)Benoit Germain2018-11-111-1/+1
|
* Make sure any linda operation that can raise an error won't ever leave a ↵Benoit Germain2018-11-081-2/+9
| | | | mutex unreleased
* Improve LuaJIT-x64 compatibilityBenoit Germain2018-10-301-7/+9
| | | | | Restrict internal "light userdata constants" to 47 significant bits when compiling against LuaJIT-x64
* More MinGW buildfixes (I hope)Benoit Germain2018-10-251-1/+1
|
* Fix Lanes build by reorganizing types around a bitBenoit Germain2018-10-251-14/+14
|
* Fix for deep-aware modulesBenoit Germain2017-08-011-5/+3
| | | | | | Don't crash when using a module that creates Lanes-compatible deep userdata. Added a sample deep-aware module.
* Improve LuaJIT supportBenoit Germain2017-05-101-5/+5
| | | | | | | * better LuaJIT-specific headers detection * add LuaJIT-specific libraries when known * properly raise an error when attempting to transfer a LUAT_CDATA value * some compilationg warning fixes
* Merge pull request #125 from mpeterv/fix-implicit-n2s-conversionBenoit Germain2016-11-211-3/+1
|\ | | | | Fix an implicit number-to-string conversion in keeper.c
| * Fix an implicit number-to-string conversion in keeper.cPeter Melnichenko2016-07-051-3/+1
| |
* | Fix 64 bits compilation warningsBenoit Germain2016-11-211-2/+2
|/
* preliminary Lua 5.3 supportBenoit Germain2014-12-161-39/+38
| | | | Untested, but it might just work :).
* Fix build issues with compat.c/hBenoit Germain2014-04-231-4/+1
|
* Don't mutex-wrap require() more than onceBenoit Germain2014-03-191-1/+1
|
* Fixed crash when using protect_allocator optionBenoit Germain2014-03-171-2/+2
|
* linda:send() improvementsBenoit Germain2014-02-271-6/+2
| | | | | | | | | * Bumped version to 3.9.3 * new exposed variable linda.null that exposes the internal NIL_SENTINEL marker * linda:send() interprets send key linda.null as authorization to silently send a single nil when not provided with anything to send (useful when sending results of a function that can return nothing)
* Multiverse compatibilityBenoit Germain2014-02-261-69/+89
| | | | | | | | | | | | | | | * bumped version to 3.9.2 * Internal rework: the whole Lanes engine now works "per universe" to allow concurrent Lanes execution in more than one embedded master state * this universe is a full userdata created in the master state, selfdestruct_gc is the __gc for this userdata * most of what was initialized only once is now per-universe * Fixed potential crashes at desinit if problems occur during keeper states initialisation * Fixed require() not always serialized properly * Raise an error instead of crashing on deep userdata prelude memory allocation failure * Added forgotten mutex desinitialisation at universe shutdown
* Lanes init crash fixBenoit Germain2014-02-181-25/+42
| | | | | | | | | | | * bumped version to 3.9.1 * keeper array is allocated with master state's alloc function instead of malloc()/free() * prevent application crash when specifying a very large number of keepers in the configuration options * removed some keeper desinit legacy dead code * any error occuring during one-time inits is raised outside the one-time mutex protected code region
* lindas can have a group for keeper state assignation controlBenoit Germain2014-02-171-4/+4
|
* Deep userdata support improvementsBenoit Germain2014-02-171-11/+33
| | | | | | | | | | | | * bumped version to 3.9.0 * keepers now require "package", receive package.path & package.cpath, and call on_state_create() if it is a C function * changed the deep public API (improved deep idfunc signature, renamed luaG_deep_userdata to luaG_newdeepuserdata) * if an error occurs while copying a deep userdata, don't raise inside the keeper state * fixed situations where raised errors could lead to memory leaks (deep gc)
* more fixes/tweaks about cancelled lindasBenoit Germain2014-02-131-0/+2
| | | | | | | | | | * bumped version to 3.8.5 * linda:limit() returns lanes.cancel_error on a limited linda * lanes.genlock() and lanes.genatomic() support cancelled lindas by returning lanes.cancel_error whenever appropriate * fixed a possible Lua stack overflow when calling linda:dump() * fixed cases where linda:send() and linda:receive() would not return lanes.cancel_error when they should
* linda performance improvementBenoit Germain2014-01-201-5/+9
| | | | | slightly improve linda performance when the producer/consumer scenario leaves leave the key empty
* get()/set() improvementsBenoit Germain2014-01-201-48/+54
| | | | | | | * bumped version to 3.8.0 * linda:set() accepts multiple values to set in the specified slot * linda:get() accepts an optional count to peek several values at once * nil values are now converted just as in send()/receive()
* Linda fixesBenoit Germain2014-01-091-29/+67
| | | | | | | | | | | * bumped version to 3.7.7 * fix crash when calling linda:count() on unknown keys * purge key storage with linda:set( key, nil) on an unlimited key to reduce memory usage with lots of keys * linda:limit() wakes write-blocked threads if necessary when the new limit enables writes to occur again * linda:set() wakes write-blocked threads if necessary if the operation created some room to write into
* fixed a shutdown crashBenoit Germain2013-12-201-6/+10
| | | | | | | * fixed a crash that can occur at shutdown when an object stored inside a keeper state performs a linda operation on a linda making use of another keeper * bumped version to 3.7.5
* supposedly improved pthread supportBenoit Germain2013-11-291-5/+4
| | | | | | | | | * 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)
* Fix a 64 bits compilation warningBenoit Germain2013-11-261-1/+1
|
* Fix compilation warning introduced by aef73939a513e67989a9ad2256f14754ebdaa28e.Benoit Germain2013-11-181-2/+3
|
* Get rid of uintptr_t to remove dependency on stdint.hBenoit Germain2013-11-181-1/+1
| | | Fix issue #76.
* Fix a deadlock when GCing during a linda operation.Benoit Germain2013-11-181-1/+3
| | | See issue #73.
* Added a comment in keeper_call()Benoit Germain2013-11-161-0/+4
|
* Remove inclusion of stdint.hBenoit Germain2013-10-251-1/+0
|
* Don't call on_state_create in keeper states, as it is no longer necessaryBenoit Germain2013-10-251-18/+11
|
* version 3.7.0Benoit Germain2013-10-111-16/+30
| | | | | | | | | | | | * 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
* version 3.6.6Benoit Germain2013-09-271-2/+0
| | | | | | | | no longer call core.configure with dummy params when requiring lanes more than once (fixes potential multithreading issues with LuaJIT allocator) activated EnableCrashingOnCrashes() Win32 debug builds fixed some comments in code
* Reduce memory footprint, simplify module order setup in conjuction with ↵Benoit Germain2013-09-261-71/+7
| | | | | | | | | | | | Lanes, and send over native functions a bit faster as well * Lanes no longer has to internally require modules inside the keeper states because they no longer need a lookup database. the lookup name is stored as-is and actually converted in the destination state * optimisation: bypass cache when sending native functions over * removed all the KEEPER_MODEL_LUA code, as it can no longer work anyway
* Fix bad assertion in linda dump utilityBenoit Germain2013-02-141-2/+8
|
* version 3.5.1v3.5.1Benoit Germain2013-02-131-1/+1
| | | | | | | * 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
* version 3.5.0Benoit Germain2013-01-301-6/+9
| | | | | | | | | | | | | | * new: API lanes.require(), use it instead of regular require() for modules that export C functions you need to send over. * new: lanes no longer require 'lanes.core' by default in every created state. Use {required={"lanes.core"}} if you need to transfer lanes functions. * internal: because of the above, reworked the timer implementation to remove upvalue-dependency on lanes.core * new: API lanes.timer_lane, to be able to operate on timer lane if need be * improved: if a module is a full userdata, scan its metatable for function database population * improved: on_state_create can be a Lua function * changed: on_state_create is called after the base libraries are loaded * package[loaders|searchers] is no longer transfered as function naming depends on slot order * internal: changed separator from '.' to '/' in lookup databases to be able to distinguish search levels and dot coming from module names * added some mode debug spew * updated tests to reflect the above changes