mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
For the coming switch to cap/handle ref-counting being the main lifetime determiner of objects, get rid of self handles for threads and processes to avoid circular references. Instead, passing 0 to syscalls expecting a thread or process handle signifies "this process/thread".
27 lines
483 B
Modula-2
27 lines
483 B
Modula-2
object thread : object {
|
|
uid 11f23e593d5761bd
|
|
|
|
capabilities [
|
|
kill
|
|
join
|
|
]
|
|
|
|
method create [constructor] {
|
|
param process ref process [optional cap:create_thread]
|
|
param stack_top address
|
|
param entrypoint address
|
|
param arg0 uint64
|
|
param arg1 uint64
|
|
}
|
|
|
|
method kill [destructor cap:kill]
|
|
|
|
method join [cap:join]
|
|
|
|
method exit [static]
|
|
|
|
method sleep [static] {
|
|
param duration uint64
|
|
}
|
|
}
|