lib
clib
posix.c
Go to the documentation of this file.
1
/****************************************************************/
2
/* posix.c
3
/* 1995-Jul nanosleep by S.Kagami.
4
/****************************************************************/
5
6
7
#include "
eus.h
"
8
9
#if Solaris2
10
typedef
struct
{
11
long
tv_sec
;
/* seconds */
12
long
tv_nsec
;
/* and nanoseconds */
13
}
timespec
;
14
15
pointer
NANOSLEEP
(
context
*ctx,
int
n
,
pointer
*argv)
16
{
17
timespec
rqtp, rmtp;
18
19
ckarg
(2);
20
rqtp.
tv_sec
= ckintval(argv[0]);
21
rqtp.
tv_nsec
= ckintval(argv[1]);
22
23
nanosleep(&rqtp, &rmtp);
24
return
(
T
);
25
}
26
#endif
27
28
/* initialization of posix functions*/
29
posix
(
context
*ctx,
int
n
,
pointer
argv[])
30
{
31
pointer
mod=argv[0];
32
33
pointer
p=spevalof(
PACKAGE
);
34
35
spevalof(
PACKAGE
)=
unixpkg
;
36
37
#if Solaris2
38
defun
(ctx,
"NANOSLEEP"
,mod,
NANOSLEEP
,
NULL
);
39
#endif
40
41
/* restore package*/
spevalof(
PACKAGE
)=p;
42
}
defun
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
context
Definition:
eus.h:524
timespec::tv_sec
long tv_sec
Definition:
posix.c:11
PACKAGE
pointer PACKAGE
Definition:
eus.c:110
T
pointer T
Definition:
eus.c:110
eus.h
timespec::tv_nsec
long tv_nsec
Definition:
posix.c:12
NULL
#define NULL
Definition:
transargv.c:8
unixpkg
pointer unixpkg
Definition:
eus.c:109
posix
posix(context *ctx, int n, pointer argv[])
Definition:
posix.c:29
cell
Definition:
eus.h:381
timespec
Definition:
posix.c:10
NANOSLEEP
pointer NANOSLEEP(context *ctx, int n, pointer *argv)
Definition:
posix.c:15
n
GLfloat n[6][3]
Definition:
cube.c:15
ckarg
ckarg(2)
euslisp
Author(s): Toshihiro Matsui
autogenerated on Thu Jun 15 2023 02:06:43