[uClibc-cvs] uClibc/libc/misc/sysvipc ftok.c, 1.3, 1.4 ipc.h, 1.2, 1.3 msgq.c, 1.2, 1.3 sem.c, 1.4, 1.5 shm.c, 1.5, 1.6

Erik Andersen andersen at uclibc.org
Wed Jan 21 23:27:41 UTC 2004


Update of /var/cvs/uClibc/libc/misc/sysvipc
In directory nail:/tmp/cvs-serv30526/misc/sysvipc

Modified Files:
	ftok.c ipc.h msgq.c sem.c shm.c 
Log Message:
Split up syscalls.c, since it had grown to be quite large and ugly.
 -Erik


Index: sem.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/sysvipc/sem.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- sem.c	25 Aug 2002 00:08:23 -0000	1.4
+++ sem.c	21 Jan 2004 23:27:39 -0000	1.5
@@ -44,7 +44,7 @@
 int semctl(int semid, int semnum, int cmd, ...)
 {
     union semun arg;
-    va_list ap; 
+    va_list ap;
 
     /* Get the argument.  */
     va_start (ap, cmd);
@@ -53,24 +53,24 @@
 #ifdef __NR_semctl
     return __semctl(semid, semnum, cmd, &arg);
 #else
-    return __ipc(IPCOP_semctl, semid, semnum, cmd, &arg);
+    return __syscall_ipc(IPCOP_semctl, semid, semnum, cmd, &arg);
 #endif
-}    
+}
 #endif
 
 #ifdef L_semget
 /* for definition of NULL */
-#include <stdlib.h>		
+#include <stdlib.h>
 
 #ifdef __NR_semget
 _syscall3(int, semget, key_t, key, int, nsems, int, semflg);
 
 #else
-/* Return identifier for array of NSEMS semaphores associated 
+/* Return identifier for array of NSEMS semaphores associated
  * with KEY.  */
 int semget (key_t key, int nsems, int semflg)
 {
-    return __ipc(IPCOP_semget, key, nsems, semflg, NULL);
+    return __syscall_ipc(IPCOP_semget, key, nsems, semflg, NULL);
 }
 #endif
 #endif
@@ -84,7 +84,7 @@
 /* Perform user-defined atomical operation of array of semaphores.  */
 int semop (int semid, struct sembuf *sops, size_t nsops)
 {
-    return __ipc(IPCOP_semop, semid, (int) nsops, 0, sops);
+    return __syscall_ipc(IPCOP_semop, semid, (int) nsops, 0, sops);
 }
 #endif
 #endif

Index: shm.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/sysvipc/shm.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- shm.c	30 May 2002 00:41:03 -0000	1.5
+++ shm.c	21 Jan 2004 23:27:39 -0000	1.6
@@ -38,7 +38,7 @@
     int retval;
     unsigned long raddr;
 
-    retval = __ipc(IPCOP_shmat, shmid, shmflg, (int) &raddr, (void *) shmaddr);
+    retval = __syscall_ipc(IPCOP_shmat, shmid, shmflg, (int) &raddr, (void *) shmaddr);
     return ((unsigned long int) retval > -(unsigned long int) SHMLBA
 	    ? (void *) retval : (void *) raddr);
 }
@@ -52,7 +52,7 @@
 #else
 int shmctl (int shmid, int cmd, struct shmid_ds *buf)
 {
-    return __ipc(IPCOP_shmctl, shmid, cmd, 0, buf);
+    return __syscall_ipc(IPCOP_shmctl, shmid, cmd, 0, buf);
 }
 #endif
 #endif
@@ -66,7 +66,7 @@
 #else
 int shmdt (const void *shmaddr)
 {
-    return __ipc(IPCOP_shmdt, 0, 0, 0, (void *) shmaddr);
+    return __syscall_ipc(IPCOP_shmdt, 0, 0, 0, (void *) shmaddr);
 }
 #endif
 #endif
@@ -79,7 +79,7 @@
 #else
 int shmget (key_t key, size_t size, int shmflg)
 {
-    return __ipc(IPCOP_shmget, key, size, shmflg, NULL);
+    return __syscall_ipc(IPCOP_shmget, key, size, shmflg, NULL);
 }
 #endif
 #endif

Index: ftok.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/sysvipc/ftok.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ftok.c	19 Aug 2002 18:04:08 -0000	1.3
+++ ftok.c	21 Jan 2004 23:27:39 -0000	1.4
@@ -20,10 +20,7 @@
 #include <sys/ipc.h>
 #include <sys/stat.h>
 
-key_t
-ftok (pathname, proj_id)
-     const char *pathname;
-     int proj_id;
+key_t ftok (const char *pathname, int proj_id)
 {
   struct stat st;
   key_t key;

Index: ipc.h
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/sysvipc/ipc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ipc.h	12 May 2002 00:49:32 -0000	1.2
+++ ipc.h	21 Jan 2004 23:27:39 -0000	1.3
@@ -5,7 +5,7 @@
 #ifdef __NR_ipc
 
 /* The actual system call: all functions are multiplexed by this.  */
-extern int __ipc __P((int __call, int __first, int __second,
+extern int __syscall_ipc __P((int __call, int __first, int __second,
 					  int __third, void *__ptr));
 
 

Index: msgq.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/sysvipc/msgq.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- msgq.c	30 May 2002 00:41:03 -0000	1.2
+++ msgq.c	21 Jan 2004 23:27:39 -0000	1.3
@@ -11,7 +11,7 @@
 /* Message queue control operation.  */
 int msgctl (int msqid, int cmd, struct msqid_ds *buf)
 {
-    return __ipc(IPCOP_msgctl ,msqid ,cmd ,0 ,buf);
+    return __syscall_ipc(IPCOP_msgctl ,msqid ,cmd ,0 ,buf);
 }
 #endif
 #endif
@@ -24,7 +24,7 @@
 /* Get messages queue.  */
 int msgget (key_t key, int msgflg)
 {
-    return __ipc(IPCOP_msgget ,key ,msgflg ,0 ,0);
+    return __syscall_ipc(IPCOP_msgget ,key ,msgflg ,0 ,0);
 }
 #endif
 #endif
@@ -32,7 +32,7 @@
 
 struct new_msg_buf{
     struct msgbuf * oldmsg;
-    long int r_msgtyp;       /* the fifth arg of __ipc */
+    long int r_msgtyp;       /* the fifth arg of __syscall_ipc */
 };
 /* Receive message from message queue.  */
 
@@ -48,7 +48,7 @@
 
     temp.r_msgtyp = msgtyp;
     temp.oldmsg = msgp;
-    return __ipc(IPCOP_msgrcv ,msqid ,msgsz ,msgflg ,&temp);
+    return __syscall_ipc(IPCOP_msgrcv ,msqid ,msgsz ,msgflg ,&temp);
 }
 #endif
 #endif
@@ -62,7 +62,7 @@
 /* Send message to message queue.  */
 int msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
 {
-    return __ipc(IPCOP_msgsnd, msqid, msgsz, msgflg, (void *)msgp);
+    return __syscall_ipc(IPCOP_msgsnd, msqid, msgsz, msgflg, (void *)msgp);
 }
 #endif
 #endif




More information about the uClibc-cvs mailing list