mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-24 07:40:40 -08:00
ecl_musleep: get rid of unused alertable argument
Was always set to true.
This commit is contained in:
parent
3f7581e884
commit
b049695ec0
4 changed files with 13 additions and 19 deletions
|
|
@ -806,7 +806,7 @@ cl_boot(int argc, char **argv)
|
|||
* When the thread exits, sometimes the dyld library gets
|
||||
* called, and if we call dlopen() at the same time we
|
||||
* cause ECL to hang */
|
||||
ecl_musleep(1e-3, 1);
|
||||
ecl_musleep(1e-3);
|
||||
}
|
||||
#endif
|
||||
ECL_SET(@'ext::*program-exit-code*', code);
|
||||
|
|
|
|||
|
|
@ -526,7 +526,7 @@ mp_process_yield(void)
|
|||
#elif defined(HAVE_SCHED_H)
|
||||
sched_yield();
|
||||
#else
|
||||
ecl_musleep(0.0, 1);
|
||||
ecl_musleep(0.0);
|
||||
#endif
|
||||
@(return);
|
||||
}
|
||||
|
|
|
|||
26
src/c/time.d
26
src/c/time.d
|
|
@ -107,7 +107,7 @@ ecl_get_internal_run_time(struct ecl_timeval *tv)
|
|||
}
|
||||
|
||||
void
|
||||
ecl_musleep(double time, bool alertable)
|
||||
ecl_musleep(double time)
|
||||
{
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
struct timespec tm;
|
||||
|
|
@ -118,7 +118,7 @@ ecl_musleep(double time, bool alertable)
|
|||
code = nanosleep(&tm, &tm);
|
||||
{
|
||||
int old_errno = errno;
|
||||
if (code < 0 && old_errno == EINTR && !alertable) {
|
||||
if (code < 0 && old_errno == EINTR) {
|
||||
goto AGAIN;
|
||||
}
|
||||
}
|
||||
|
|
@ -133,10 +133,8 @@ ecl_musleep(double time, bool alertable)
|
|||
FILETIME filetime;
|
||||
DWORDLONG hundred_ns;
|
||||
} end, now;
|
||||
if (alertable) {
|
||||
GetSystemTimeAsFileTime(&end.filetime);
|
||||
end.hundred_ns += wait;
|
||||
}
|
||||
GetSystemTimeAsFileTime(&end.filetime);
|
||||
end.hundred_ns += wait;
|
||||
do {
|
||||
DWORDLONG interval;
|
||||
if (wait > maxtime) {
|
||||
|
|
@ -146,16 +144,12 @@ ecl_musleep(double time, bool alertable)
|
|||
interval = wait;
|
||||
wait = 0;
|
||||
}
|
||||
if (SleepEx(interval/10000, alertable) != 0) {
|
||||
if (alertable) {
|
||||
if (SleepEx(interval/10000, 1) != 0) {
|
||||
GetSystemTimeAsFileTime(&now.filetime);
|
||||
if (now.hundred_ns >= end.hundred_ns)
|
||||
break;
|
||||
} else {
|
||||
GetSystemTimeAsFileTime(&now.filetime);
|
||||
if (now.hundred_ns >= end.hundred_ns)
|
||||
break;
|
||||
else
|
||||
wait = end.hundred_ns - now.hundred_ns;
|
||||
}
|
||||
else
|
||||
wait = end.hundred_ns - now.hundred_ns;
|
||||
}
|
||||
} while (wait);
|
||||
#else
|
||||
|
|
@ -194,7 +188,7 @@ cl_sleep(cl_object z)
|
|||
time = 1e-9;
|
||||
}
|
||||
} ECL_WITHOUT_FPE_END;
|
||||
ecl_musleep(time, 1);
|
||||
ecl_musleep(time);
|
||||
@(return ECL_NIL);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ struct ecl_timeval {
|
|||
|
||||
extern void ecl_get_internal_real_time(struct ecl_timeval *time);
|
||||
extern void ecl_get_internal_run_time(struct ecl_timeval *time);
|
||||
extern void ecl_musleep(double time, bool alertable);
|
||||
extern void ecl_musleep(double time);
|
||||
|
||||
#define UTC_time_to_universal_time(x) ecl_plus(ecl_make_integer(x),cl_core.Jan1st1970UT)
|
||||
extern cl_fixnum ecl_runtime(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue