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 }
Definition: eus.h:522
pointer unixpkg
Definition: eus.c:109
pointer T
Definition: eus.c:110
GLfloat n[6][3]
Definition: cube.c:15
pointer NANOSLEEP(context *ctx, int n, pointer *argv)
Definition: posix.c:15
long tv_sec
Definition: posix.c:11
defun("ADR_TO_STRING", mod, ADR_TO_STRING)
ckarg(2)
long tv_nsec
Definition: posix.c:12
Definition: eus.h:379
pointer PACKAGE
Definition: eus.c:110
#define NULL
Definition: transargv.c:8
posix(context *ctx, int n, pointer argv[])
Definition: posix.c:29
Definition: posix.c:10


euslisp
Author(s): Toshihiro Matsui
autogenerated on Fri Feb 21 2020 03:20:54