Yorick Hardy
23301bfd1a
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.
2025-01-16 20:30:24 +02:00
Yorick Hardy
7d32069e2a
srfi-18: define all of the components of the *primordial-thread* thread object
2025-01-16 20:26:10 +02:00
Yorick Hardy
bb3df95d13
Define *ai-v4mapped* to zero on platforms where AI_V4MAPPED is undefined.
...
This change defines *ai-v4mapped* to zero when AI_V4MAPPED is undefined
and similarly for *ai-all* (similar to other patches). This allows
(srfi 106) to be available on NetBSD and other platforms without
AI_V4MAPPED and is the recommended behaviour by the author of SRFI-106:
https://srfi-email.schemers.org/srfi-106/msg/2762553/
2024-03-05 22:18:44 +02:00
Justin Ethier
e7725a2a36
Issue #519 - Fix fxlength
2024-01-08 19:00:39 -08:00
Jeronimo Pellegrini
b60bfc266b
SRFI 143: fx-{width,least,greatest} are not procedures
...
In the SRFI text, these are constants:
fx-width
fx-greatest
fx-least
But they were implemented as procedures in Cyclone.
This patch changes that, so they now are implemented
as constants.
2023-03-04 06:53:53 -03:00
Justin Ethier
fa58b9d538
fxbit-set?
properly handles negative i
2021-08-08 21:47:31 -04:00
Justin Ethier
2a9d0ea604
Issue #279 - Support end-result and return from thread-join
2021-07-25 23:02:31 -04:00
Justin Ethier
df5438c9f6
Fix (thread-start!) to return thread obj, per SRFI 18
2021-07-23 16:31:04 -04:00
Justin Ethier
8f9698b1fc
Avoid C compiler warning
2021-03-18 13:24:39 -04:00
Justin Ethier
738877f225
Issue #370 - Added current-thread-data
...
This allows returning the current thread data structure in a Opaque object.
2021-01-24 21:58:58 -05:00
Justin Ethier
6a59ab2a5d
Issue #428 - Removed obsolete (srfi 9)
2020-12-29 21:30:51 -05:00
Justin Ethier
5978e98e37
Issue #414 - Include SRFI 162 defs
2020-09-30 13:06:59 -04:00
Justin Ethier
768e07139b
Initial file
2020-09-30 13:01:31 -04:00
Justin Ethier
cf078d9d6c
Add additional SRFI 132 functions
2020-09-03 19:02:41 -04:00
Justin Ethier
10630b4907
Allow optional thread cont arg
2020-08-12 18:49:02 -04:00
Justin Ethier
34ece856d8
Fix compiler warnings
2019-12-23 19:24:17 -05:00
Justin Ethier
59bb0b4f41
Fix compiler error
2019-12-23 19:15:56 -05:00
Justin Ethier
e96ed6266a
Avoid compiler warning on OSX
2019-12-23 19:06:48 -05:00
Justin Ethier
c9921ce69a
Fix libtommath warnings
2019-10-23 13:24:13 -04:00
Justin Ethier
85751cda2b
Issue #326 - Use timer to seed pseudorandom numbers
2019-07-24 13:19:38 -04:00
Justin Ethier
a14d3efe80
Cleanup
2019-06-24 19:02:30 -04:00
Justin Ethier
5cb5540d2e
WIP: timed mutex lock
2019-06-24 17:55:01 -04:00
Justin Ethier
1a1f707a73
Relocated test library
2019-06-19 18:29:42 -04:00
Justin Ethier
d1dbd7fae9
Issue #320 - Track threads that have not yet run
...
This allows (thread-join!) to be able to wait on these new threads
2019-06-10 13:16:39 -04:00
Justin Ethier
22ca4ff85a
Issue #320 - Ensure caller has ref to child thread
2019-06-07 16:12:31 -04:00
Justin Ethier
78d5265442
New file
2019-05-17 12:37:16 -04:00
Justin Ethier
f69a458625
Sync up with latest changes to 132
...
There may be more fixes, this is more of a temporary band-aid.
2019-04-18 17:07:31 -04:00
Justin Ethier
f5b68ee8d2
Handle hashing of complex nums with a 0i component
2019-02-19 13:20:29 -05:00
Justin Ethier
74148a2f16
Remove dependency on (scheme complex)
2019-02-14 13:55:56 -05:00
Justin Ethier
4632efc71d
Added Cyc-memoize
2019-02-14 12:44:48 -05:00
Justin Ethier
a42b5acdc8
Issue #176 - Improve hash-by-identity
2018-05-01 13:27:59 -04:00
Justin Ethier
20379a264c
Issue #249 - Improve hash table performance
...
Hardcode bound such that it is not a bignum (reducing bignum allocations).
Replace symbol hash with a more efficient algorithm, since symbols are uniquely identified by memory location as well as name.
2018-04-30 13:59:22 -04:00
Justin Ethier
da51147b68
Issue #81 - allow for large recv sizes
2018-01-03 17:25:07 -05:00
Justin Ethier
8ec41e34bf
Issue #218 - Fix startup issue
2017-09-04 18:57:23 -04:00
Justin Ethier
8f4e0ccf75
Issue #189 - Reimplementation of bitwise-if
2017-08-29 18:41:18 -04:00
Justin Ethier
05fb1cdb7b
Use new make_input_port macro
2017-08-19 18:12:06 -04:00
Justin Ethier
9643d8742b
Cleanup
2017-08-08 18:09:54 -04:00
Justin Ethier
cb2e2a7e59
Fixup header comment
2017-08-08 16:58:31 +00:00
Justin Ethier
1028fc566a
WIP
2017-08-08 16:57:02 +00:00
Justin Ethier
444f27a8a6
Added additional defs from ref impl
2017-08-08 15:33:21 +00:00
Justin Ethier
be11ed674f
Added bit-set
2017-08-08 15:27:23 +00:00
Justin Ethier
a247ba03ad
Check for divide by zero
2017-08-08 15:09:37 +00:00
Justin Ethier
a6d2cc0b7a
Added TODO
2017-08-08 13:54:15 +00:00
Justin Ethier
0cb8f0f591
Added fxif
2017-08-08 13:51:16 +00:00
Justin Ethier
1a3f60711f
Added fxarithmetic-shift
2017-08-08 13:19:38 +00:00
Justin Ethier
390192db2a
Added shifts
2017-08-08 13:17:09 +00:00
Justin Ethier
5b5e88a61a
Adding bitwise ops
2017-08-08 13:05:17 +00:00
Justin Ethier
c46f3991d3
WIP
2017-08-08 12:52:44 +00:00
Justin Ethier
64b1afa5e2
WIP
2017-08-07 18:51:59 -04:00
Justin Ethier
59fc9ebba3
Added TODO
2017-08-07 17:41:32 +00:00