mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Use the name thread-sleep!
This commit is contained in:
parent
8895bee4ed
commit
d9656fc793
5 changed files with 11 additions and 10 deletions
|
@ -229,7 +229,7 @@ extern const object primitive_Cyc_91cvar_127;
|
|||
extern const object primitive_Cyc_91has_91cycle_127;
|
||||
extern const object primitive_Cyc_91spawn_91thread_67;
|
||||
extern const object primitive_Cyc_91end_91thread_67;
|
||||
extern const object primitive_Cyc_91thread_91sleep_67;
|
||||
extern const object primitive_thread_91sleep_67;
|
||||
extern const object primitive__87;
|
||||
extern const object primitive__91;
|
||||
extern const object primitive__85;
|
||||
|
|
|
@ -1709,8 +1709,8 @@ void _Cyc_91spawn_91thread_67(void *data, object cont, object args) {
|
|||
void _Cyc_91end_91thread_67(void *data, object cont, object args) {
|
||||
Cyc_end_thread((gc_thread_data *)data);
|
||||
return_closcall1(data, cont, boolean_f); }
|
||||
void _Cyc_91thread_91sleep_67(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "Cyc-thread-sleep!", 1, args);
|
||||
void _thread_91sleep_67(void *data, object cont, object args) {
|
||||
Cyc_check_num_args(data, "thread-sleep!", 1, args);
|
||||
return_closcall1(data, cont, Cyc_thread_sleep(data, car(args))); }
|
||||
void __87(void *data, object cont, object args) {
|
||||
integer_type argc = Cyc_length(data, args);
|
||||
|
@ -2903,7 +2903,7 @@ static primitive_type Cyc_91cvar_127_primitive = {{0}, primitive_tag, "Cyc-cvar?
|
|||
static primitive_type Cyc_91has_91cycle_127_primitive = {{0}, primitive_tag, "Cyc-has-cycle?", &_Cyc_91has_91cycle_127};
|
||||
static primitive_type Cyc_91spawn_91thread_67_primitive = {{0}, primitive_tag, "Cyc-spawn-thread!", &_Cyc_91spawn_91thread_67};
|
||||
static primitive_type Cyc_91end_91thread_67_primitive = {{0}, primitive_tag, "Cyc-end-thread!", &_Cyc_91end_91thread_67};
|
||||
static primitive_type Cyc_91thread_91sleep_67_primitive = {{0}, primitive_tag, "Cyc-thread-sleep!", &_Cyc_91thread_91sleep_67};
|
||||
static primitive_type thread_91sleep_67_primitive = {{0}, primitive_tag, "thread-sleep!", &_thread_91sleep_67};
|
||||
static primitive_type _87_primitive = {{0}, primitive_tag, "+", &__87};
|
||||
static primitive_type _91_primitive = {{0}, primitive_tag, "-", &__91};
|
||||
static primitive_type _85_primitive = {{0}, primitive_tag, "*", &__85};
|
||||
|
@ -3023,7 +3023,7 @@ const object primitive_Cyc_91cvar_127 = &Cyc_91cvar_127_primitive;
|
|||
const object primitive_Cyc_91has_91cycle_127 = &Cyc_91has_91cycle_127_primitive;
|
||||
const object primitive_Cyc_91spawn_91thread_67 = &Cyc_91spawn_91thread_67_primitive;
|
||||
const object primitive_Cyc_91end_91thread_67 = &Cyc_91end_91thread_67_primitive;
|
||||
const object primitive_Cyc_91thread_91sleep_67 = &Cyc_91thread_91sleep_67_primitive;
|
||||
const object primitive_thread_91sleep_67 = &thread_91sleep_67_primitive;
|
||||
const object primitive__87 = &_87_primitive;
|
||||
const object primitive__91 = &_91_primitive;
|
||||
const object primitive__85 = &_85_primitive;
|
||||
|
@ -3211,6 +3211,7 @@ void Cyc_end_thread(gc_thread_data *thd)
|
|||
// For now, accept a number of milliseconds to sleep
|
||||
object Cyc_thread_sleep(void *data, object timeout)
|
||||
{
|
||||
// TODO: looks like there are overflow issues here:
|
||||
struct timespec tim;
|
||||
Cyc_check_num(data, timeout);
|
||||
tim.tv_sec = 0;
|
||||
|
|
|
@ -452,7 +452,7 @@
|
|||
((eq? p 'Cyc-has-cycle?) "Cyc_has_cycle")
|
||||
((eq? p 'Cyc-spawn-thread!) "Cyc_spawn_thread")
|
||||
((eq? p 'Cyc-end-thread!) "Cyc_end_thread")
|
||||
((eq? p 'Cyc-thread-sleep!) "Cyc_thread_sleep")
|
||||
((eq? p 'thread-sleep!) "Cyc_thread_sleep")
|
||||
((eq? p 'Cyc-stdout) "Cyc_stdout")
|
||||
((eq? p 'Cyc-stdin) "Cyc_stdin")
|
||||
((eq? p 'Cyc-stderr) "Cyc_stderr")
|
||||
|
@ -584,7 +584,7 @@
|
|||
apply
|
||||
Cyc-default-exception-handler
|
||||
Cyc-end-thread!
|
||||
Cyc-thread-sleep!
|
||||
thread-sleep!
|
||||
open-input-file
|
||||
open-output-file
|
||||
close-port
|
||||
|
|
|
@ -453,7 +453,7 @@
|
|||
Cyc-has-cycle?
|
||||
Cyc-spawn-thread!
|
||||
Cyc-end-thread!
|
||||
Cyc-thread-sleep!
|
||||
thread-sleep!
|
||||
Cyc-stdout
|
||||
Cyc-stdin
|
||||
Cyc-stderr
|
||||
|
@ -559,7 +559,7 @@
|
|||
Cyc-cvar?
|
||||
Cyc-spawn-thread!
|
||||
Cyc-end-thread!
|
||||
Cyc-thread-sleep!
|
||||
thread-sleep!
|
||||
apply
|
||||
%halt
|
||||
exit
|
||||
|
|
|
@ -138,7 +138,7 @@
|
|||
(list 'Cyc-has-cycle? Cyc-has-cycle?)
|
||||
(list 'Cyc-spawn-thread! Cyc-spawn-thread!)
|
||||
(list 'Cyc-end-thread! Cyc-end-thread!)
|
||||
(list 'Cyc-thread-sleep! Cyc-thread-sleep!)
|
||||
(list 'thread-sleep! thread-sleep!)
|
||||
(list 'Cyc-default-exception-handler Cyc-default-exception-handler)
|
||||
(list 'Cyc-current-exception-handler Cyc-current-exception-handler)
|
||||
(list '+ +)
|
||||
|
|
Loading…
Add table
Reference in a new issue