libposix: sleep and pipe
This commit is contained in:
		| @@ -59,6 +59,8 @@ extern void * POSIX_malloc(int *errnop, size_t size); | ||||
| extern void *POSIX_realloc(int *errnop, void *ptr, size_t size); | ||||
| extern void *POSIX_calloc(int *errnop, size_t nelem, size_t size); | ||||
| extern void POSIX_free(void *ptr); | ||||
| extern unsigned int POSIX_sleep(unsigned int seconds); | ||||
| extern int POSIX_pipe(int *errnop, int fildes[2]); | ||||
|  | ||||
| /* Library initialization | ||||
|  */ | ||||
|   | ||||
| @@ -97,6 +97,16 @@ find_seek_type(int whence) | ||||
| 	return -1; | ||||
| } | ||||
|  | ||||
| int | ||||
| POSIX_pipe(int *errnop, int fildes[2]) | ||||
| { | ||||
| 	int res; | ||||
| 	res = jehanne_pipe(fildes); | ||||
| 	if(res == -1) | ||||
| 		*errnop = __libposix_get_errno(PosixEMFILE); | ||||
| 	return res; | ||||
| } | ||||
|  | ||||
| int | ||||
| POSIX_open(int *errnop, const char *name, int flags, int mode) | ||||
| { | ||||
|   | ||||
| @@ -41,6 +41,13 @@ POSIX_isatty(int *errnop, int fd) | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| unsigned int | ||||
| POSIX_sleep(unsigned int seconds) | ||||
| { | ||||
| 	sleep(seconds*1000); | ||||
| 	return 0; | ||||
| } | ||||
|  | ||||
| clock_t | ||||
| POSIX_times(int *errnop, void *buf) | ||||
| { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user