You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
syscall/sleep.c

16 lines
328 B

#define __LIBRARY__
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <string.h>
#include <asm/segment.h>
#include <linux/sched.h>
#include <linux/kernel.h>
int sys_sleep(unsigned int seconds)
{
sys_signal(SIGALRM, SIG_IGN, NULL);
sys_alarm(seconds);
sys_pause();
return 0;
}