Mercurial > remote-gamepad-server
diff restartOp.c @ 2:f362b20de51e
Remove trailing whitespaces.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 22 Feb 2015 18:03:26 +0100 |
parents | e70ea46d6073 |
children |
line wrap: on
line diff
--- a/restartOp.c +++ b/restartOp.c @@ -36,7 +36,7 @@ pid_t wait_rs(int *status) do { endPid=wait(status); } while ((endPid==-1) && (errno==EINTR)); - + return endPid; } */ @@ -48,7 +48,7 @@ pid_t waitpid_rs(pid_t pid, int *status, do { endPid=waitpid(pid,status,options); } while ((endPid==-1) && (errno==EINTR)); - + return endPid; } */ @@ -56,19 +56,19 @@ pid_t waitpid_rs(pid_t pid, int *status, /********************************************************/ /* sleep */ /********************************************************/ - + unsigned int sleep_rs(unsigned int seconds) { int nbSecondsElapsed = 0; - + do { - + seconds = seconds - nbSecondsElapsed; - + nbSecondsElapsed = sleep(seconds); - + } while (nbSecondsElapsed!=0); - + return 0; // Zero if the requested time has elapsed } @@ -160,15 +160,15 @@ int semop_rs(int semid, struct sembuf *s /********************************************************/ /* msgsnd, msgrcv */ /********************************************************/ -/* +/* int msgsnd_rs(int msqid, void *msgp, int msgsz, int msgflg) { int returnValue = 0; do { returnValue = msgsnd(msqid,msgp,msgsz,msgflg); - } while ((returnValue==-1) && (errno==EINTR)); - + } while ((returnValue==-1) && (errno==EINTR)); + return returnValue; } */ @@ -179,8 +179,8 @@ int msgrcv_rs(int msqid, void *msgp, int do { returnValue = msgrcv(msqid,msgp,msgsz,msgtyp,msgflg); - } while ((returnValue==-1) && (errno==EINTR)); - + } while ((returnValue==-1) && (errno==EINTR)); + return returnValue; } */