Main Page
Namespaces
Classes
Files
File List
File Members
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
}
context
Definition:
eus.h:522
unixpkg
pointer unixpkg
Definition:
eus.c:109
T
pointer T
Definition:
eus.c:110
n
GLfloat n[6][3]
Definition:
cube.c:15
NANOSLEEP
pointer NANOSLEEP(context *ctx, int n, pointer *argv)
Definition:
posix.c:15
timespec::tv_sec
long tv_sec
Definition:
posix.c:11
defun
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
ckarg
ckarg(2)
eus.h
timespec::tv_nsec
long tv_nsec
Definition:
posix.c:12
cell
Definition:
eus.h:379
PACKAGE
pointer PACKAGE
Definition:
eus.c:110
NULL
#define NULL
Definition:
transargv.c:8
posix
posix(context *ctx, int n, pointer argv[])
Definition:
posix.c:29
timespec
Definition:
posix.c:10
euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54