cyclone/srfi
yorickhardy 3db92dc3c2
pthread-terminate! takes a thread object as argument (#553)
* srfi-18: define all of the components of the *primordial-thread* thread object

* srfi-18: pthread-terminate! takes a thread object as argument

Handle this by checking if the argument is the primordial thread,
current thread or another thread.

The first two cases remain almost identical to the previous implementation.
To terminate a thread (which is not the caller) we use a pthread key
which contains the thread data. The destructor is set to Cyc_end_thread
and will terminate the thread when pthread_cancel is called. This ensures
that Cyc_end_thread is called with the correct thread data by the thread
which will be terminated.

* runtime: cast to the required type for pthread_key_create

* runtime: clear the thread_key before exiting the thread

* runtime: handle cancelled threads separately

We probably don't want to call pthread_exit in the destructor.
Similarly, we don't want to perform a longjmp (i.e. GC(...))
in the desctructor.

* runtime: do a minor GC for cancelled threads

The main idea is to avoid a longjmp and return to the destructor
for the cancelled thread. So, adjust GC and gc_minor to allow
for a NULL continuation.
2025-01-20 10:55:36 -05:00
..
comparators Initial file 2020-09-30 13:01:31 -04:00
list-queues Relocated test library 2019-06-19 18:29:42 -04:00
sets Relocated test library 2019-06-19 18:29:42 -04:00
sorting Add additional SRFI 132 functions 2020-09-03 19:02:41 -04:00
vectors Relocated test library 2019-06-19 18:29:42 -04:00
1.scm No need to repeat member/assoc here 2016-08-19 23:20:31 -04:00
1.sld Explicit inlines 2017-04-29 01:18:39 +00:00
2.scm Initial file 2016-08-20 03:16:10 -04:00
2.sld cleanup, cut over to (srfi x) 2016-08-20 18:00:55 -04:00
18.sld pthread-terminate! takes a thread object as argument (#553) 2025-01-20 10:55:36 -05:00
27.sld Issue #326 - Use timer to seed pseudorandom numbers 2019-07-24 13:19:38 -04:00
28.scm Adding full support for SRFI 28, adding tests for compliance, modifying changelog 2017-02-05 14:01:31 +13:00
28.sld Adding full support for SRFI 28, adding tests for compliance, modifying changelog 2017-02-05 14:01:31 +13:00
60.scm Fix libtommath warnings 2019-10-23 13:24:13 -04:00
60.sld Removing all need for (scheme inexact) 2017-02-10 17:59:08 +13:00
69.sld Handle hashing of complex nums with a 0i component 2019-02-19 13:20:29 -05:00
106.sld Define *ai-v4mapped* to zero on platforms where AI_V4MAPPED is undefined. 2024-03-05 22:18:44 +02:00
111.sld Added SRFI 111 2016-08-24 00:31:50 -04:00
113.sld Renamed 113 library 2016-11-29 17:04:01 -05:00
117.sld Initial file 2016-09-06 23:08:31 -04:00
121.scm Adding SRFI 121 support, tests, all tests pass 2017-02-08 22:23:36 +13:00
121.sld Adding SRFI 121 support, tests, all tests pass 2017-02-08 22:23:36 +13:00
128.sld Issue #414 - Include SRFI 162 defs 2020-09-30 13:06:59 -04:00
132.sld Add additional SRFI 132 functions 2020-09-03 19:02:41 -04:00
133.sld Explicit inlines 2017-04-29 01:18:39 +00:00
143.sld Issue #519 - Fix fxlength 2024-01-08 19:00:39 -08:00
README.md New file 2019-05-17 12:37:16 -04:00
test-1.scm Initial files 2016-08-19 23:04:50 -04:00
test-2.scm Initial file 2016-08-20 03:16:10 -04:00
vectors-impl.scm Relocated scm file 2016-08-22 18:28:14 -04:00

This directory contains the SRFI libraries provided by Cyclone.