Daniel Kochmański
74b898f72a
process: move process initialization to the process module hooks
2025-05-15 16:25:15 +02:00
Daniel Kochmański
43b92e3321
garbage: register and unregister GC threads manually from a module
...
This decouples thread primitives from the garbage collector and allows us to
build nucl once more.
2025-05-15 12:41:30 +02:00
Daniel Kochmański
fb80c72683
process: abstract away create thread, exit thread and sigmask
...
Previously we've opencoded calls to these functions, although they may be nicely
abstracted with static inline functions. This change improves code readibility
and portability.
2025-05-15 12:41:26 +02:00
Daniel Kochmański
608a361344
modules: [A/n] move the environment allocators to nucleus
...
Also clean up initialization code across different paths to have the same order.
2025-05-15 12:23:18 +02:00
Daniel Kochmański
f0c0e2f953
modules: [7/n] introduce ecl_module_stacks
2025-05-15 12:23:18 +02:00
Daniel Kochmański
f008aa1a4e
modules: [3/n] introduce ecl_module_process
2025-05-15 12:23:18 +02:00
Daniel Kochmański
4351ba6371
modules: [2/n] introduce ecl_module_unixint
2025-05-15 12:23:18 +02:00
Daniel Kochmański
d94f976587
modules: [1/n] introduce ecl_module_gc
...
We also remove conditionalization for garbage collector inclusion in autotools.
When we propose an alternative gc, then we may decide to put them back, or to
add necessary ifdef statements directly in files.
Moreover untangle c-stack from the gc code and assign the stack base with a
rough guess only when it is not initialized yet (GC will always fill it).
Finally remove a kludge from ecl_adopt_cpu and disable colleciton until the cpu
is fully initialized.
2025-05-15 12:23:18 +02:00
Daniel Kochmański
7af29da33c
modules: [0/n] introduce a new structure ecl_module in the system
...
This will allow us to decouple forward system initialization from the early
process code.
2025-05-15 12:23:15 +02:00
Daniel Kochmański
9ce19f55c2
process: move ecl_clear_bignum_registers to _dealloc_env
...
This resolves a fixme.
2025-05-15 09:32:14 +02:00
Daniel Kochmański
0375f9747c
process: use GC_thread_is_registered() instead of the_env->cleanup
...
This allows us to remove unnecessary bookkeeping.
2025-05-15 09:32:14 +02:00
Daniel Kochmański
4ea1528b34
nucleus: [2/n] move processing unit managament to nucleus
2025-05-15 09:32:12 +02:00
Daniel Kochmański
91f4fa8ec1
nucleus: [1/n] move processing unit managament to nucleus
2025-05-14 21:30:16 +02:00
Daniel Kochmański
4a760a06dd
core: split cl_core_struct in two structure cl_core and ecl_core
...
ecl_core contains early global environment that is meant to be shared by all
runtimes, while cl_core contains an environment relevant to common lisp.
2025-05-14 13:44:01 +02:00
Daniel Kochmański
62c8f3f714
threads: get rid of an annoying warning stemming from xopen
...
We've defined _XOPEN_SOURCE 600 but glibc defines it as 700 or more.
2025-05-13 14:18:10 +02:00
Daniel Kochmański
0f4e9b1e17
core: factor out process managament from thread managament
...
This is a preliminary step towards coroutines and for switching global env in
single-threaded builds.
2025-03-31 20:44:46 +02:00