Added SYSV ipc system calls.
This commit is contained in:
parent
3d903220e4
commit
5b65bca24e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2730
@ -15,7 +15,8 @@ SRCS+= alarm.c assert.c clock.c closedir.c confstr.c crypt.c ctermid.c \
|
||||
sigsetjmp.c sigsetops.c sleep.c sysconf.c sysctl.c syslog.c telldir.c \
|
||||
termios.c time.c times.c timezone.c ttyname.c ttyslot.c ualarm.c \
|
||||
uname.c unvis.c usleep.c utime.c valloc.c vis.c wait.c wait3.c \
|
||||
waitpid.c
|
||||
waitpid.c msgctl.c msgget.c msgrcv.c msgsnd.c semconfig.c semctl.c \
|
||||
semget.c semop.c shmat.c shmctl.c shmdt.c shmget.c
|
||||
|
||||
# machine-dependent gen sources
|
||||
.include "${.CURDIR}/${MACHINE}/gen/Makefile.inc"
|
||||
|
15
lib/libc/gen/msgctl.c
Normal file
15
lib/libc/gen/msgctl.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#if __STDC__
|
||||
int msgctl(int msqid, int cmd, struct msqid_ds *buf)
|
||||
#else
|
||||
int msgctl(msqid,cmd,buf)
|
||||
int msqid;
|
||||
int cmd;
|
||||
caddr_t buf;
|
||||
#endif
|
||||
{
|
||||
return (msgsys(0, msqid, cmd, buf));
|
||||
}
|
14
lib/libc/gen/msgget.c
Normal file
14
lib/libc/gen/msgget.c
Normal file
@ -0,0 +1,14 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#if __STDC__
|
||||
int msgget(key_t key, int msgflg)
|
||||
#else
|
||||
int msgget(key,msgflg)
|
||||
key_t key;
|
||||
int msgflg;
|
||||
#endif
|
||||
{
|
||||
return (msgsys(1, key, msgflg));
|
||||
}
|
17
lib/libc/gen/msgrcv.c
Normal file
17
lib/libc/gen/msgrcv.c
Normal file
@ -0,0 +1,17 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#if __STDC__
|
||||
int msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
|
||||
#else
|
||||
int msgrcv(msqid, msgp, msgsz, msgtyp, msgflg)
|
||||
int msqid;
|
||||
void *msgp;
|
||||
size_t msgsz;
|
||||
long msgtyp;
|
||||
int msgflg;
|
||||
#endif
|
||||
{
|
||||
return (msgsys(3, msqid, msgp, msgsz, msgtyp, msgflg));
|
||||
}
|
16
lib/libc/gen/msgsnd.c
Normal file
16
lib/libc/gen/msgsnd.c
Normal file
@ -0,0 +1,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/msg.h>
|
||||
|
||||
#if __STDC__
|
||||
int msgsnd(int msqid, void *msgp, size_t msgsz, int msgflg)
|
||||
#else
|
||||
int msgsnd(msqid, msgp, msgsz, msgflg)
|
||||
int msqid;
|
||||
void *msgp;
|
||||
size_t msgsz;
|
||||
int msgflg;
|
||||
#endif
|
||||
{
|
||||
return (msgsys(2, msqid, msgp, msgsz, msgflg));
|
||||
}
|
13
lib/libc/gen/semconfig.c
Normal file
13
lib/libc/gen/semconfig.c
Normal file
@ -0,0 +1,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if __STDC__
|
||||
int semconfig(int cmd, int p1, int p2, int p3)
|
||||
#else
|
||||
int semconfig(cmd, p1, p2, p3)
|
||||
int cmd, p1, p2, p3;
|
||||
#endif
|
||||
{
|
||||
return (semsys(3, cmd, p1, p2, p3));
|
||||
}
|
15
lib/libc/gen/semctl.c
Normal file
15
lib/libc/gen/semctl.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if __STDC__
|
||||
int semctl(int semid, int semnum, int cmd, union semun semun)
|
||||
#else
|
||||
int semctl(semid, int semnum, cmd, semun)
|
||||
int semid, semnum;
|
||||
int cmd;
|
||||
union semun semun;
|
||||
#endif
|
||||
{
|
||||
return (semsys(0, semid, semnum, cmd, &semun));
|
||||
}
|
15
lib/libc/gen/semget.c
Normal file
15
lib/libc/gen/semget.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if __STDC__
|
||||
int semget(key_t key, int nsems, int semflg)
|
||||
#else
|
||||
int semget(key, nsems, semflg)
|
||||
key_t key;
|
||||
int nsems;
|
||||
int semflg;
|
||||
#endif
|
||||
{
|
||||
return (semsys(1, key, nsems, semflg));
|
||||
}
|
15
lib/libc/gen/semop.c
Normal file
15
lib/libc/gen/semop.c
Normal file
@ -0,0 +1,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/sem.h>
|
||||
|
||||
#if __STDC__
|
||||
int semop(int semid, struct sembuf *sops, unsigned nsops)
|
||||
#else
|
||||
int semop(semid, sops, nsops)
|
||||
int semid;
|
||||
struct sembuf *sops;
|
||||
unsigned nsops;
|
||||
#endif
|
||||
{
|
||||
return (semsys(2, semid, sops, nsops, 0));
|
||||
}
|
19
lib/libc/gen/shmat.c
Normal file
19
lib/libc/gen/shmat.c
Normal file
@ -0,0 +1,19 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$Id: shmat.c,v 1.2 1993/10/10 12:01:26 rgrimes Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#if __STDC__
|
||||
void *shmat(int shmid, void *shmaddr, int shmflg)
|
||||
#else
|
||||
void *shmat(shmid, shmaddr, shmflg)
|
||||
int shmid;
|
||||
void *shmaddr;
|
||||
int shmflg;
|
||||
#endif
|
||||
{
|
||||
return ((void *)shmsys(0, shmid, shmaddr, shmflg));
|
||||
}
|
19
lib/libc/gen/shmctl.c
Normal file
19
lib/libc/gen/shmctl.c
Normal file
@ -0,0 +1,19 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$Id: shmctl.c,v 1.2 1993/10/10 12:01:28 rgrimes Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#if __STDC__
|
||||
int shmctl(int shmid, int cmd, struct shmid_ds *buf)
|
||||
#else
|
||||
int shmctl(shmid, cmd, buf)
|
||||
int shmid;
|
||||
int cmd;
|
||||
struct shmid_ds *buf;
|
||||
#endif
|
||||
{
|
||||
return (shmsys(4, shmid, cmd, buf));
|
||||
}
|
17
lib/libc/gen/shmdt.c
Normal file
17
lib/libc/gen/shmdt.c
Normal file
@ -0,0 +1,17 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$Id: shmdt.c,v 1.2 1993/10/10 12:01:29 rgrimes Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#if __STDC__
|
||||
int shmdt(void *shmaddr)
|
||||
#else
|
||||
int shmdt(shmaddr)
|
||||
void *shmaddr;
|
||||
#endif
|
||||
{
|
||||
return (shmsys(2, shmaddr));
|
||||
}
|
19
lib/libc/gen/shmget.c
Normal file
19
lib/libc/gen/shmget.c
Normal file
@ -0,0 +1,19 @@
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
static char *rcsid = "$Id: shmget.c,v 1.1 1993/09/27 00:57:49 rgrimes Exp $";
|
||||
#endif /* LIBC_SCCS and not lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
#include <sys/shm.h>
|
||||
|
||||
#if __STDC__
|
||||
int shmget(key_t key, int size, int shmflg)
|
||||
#else
|
||||
int shmget(key, size, shmflg)
|
||||
key_t key;
|
||||
int size;
|
||||
int shmflg;
|
||||
#endif
|
||||
{
|
||||
return (shmsys(3, key, size, shmflg));
|
||||
}
|
@ -22,13 +22,13 @@ ASM= accept.o access.o acct.o adjtime.o bind.o chdir.o chflags.o chmod.o \
|
||||
getuid.o ioctl.o kill.o ktrace.o lfs_bmapv.o lfs_markv.o \
|
||||
lfs_segclean.o lfs_segwait.o link.o listen.o lstat.o \
|
||||
madvise.o mincore.o mkdir.o mkfifo.o mknod.o mlock.o mount.o \
|
||||
mprotect.o msync.o munlock.o munmap.o nfssvc.o \
|
||||
mprotect.o msgsys.o msync.o munlock.o munmap.o nfssvc.o \
|
||||
ntp_adjtime.o ntp_gettime.o open.o \
|
||||
pathconf.o profil.o quotactl.o read.o \
|
||||
readlink.o readv.o recvfrom.o recvmsg.o rename.o revoke.o rmdir.o \
|
||||
rtprio.o select.o sendmsg.o sendto.o setegid.o seteuid.o setgid.o \
|
||||
rtprio.o select.o semsys.o sendmsg.o sendto.o setegid.o seteuid.o setgid.o \
|
||||
setgroups.o setitimer.o setpgid.o setpriority.o setrlimit.o \
|
||||
setsid.o setsockopt.o settimeofday.o setuid.o shutdown.o \
|
||||
setsid.o setsockopt.o settimeofday.o setuid.o shmsys.o shutdown.o \
|
||||
sigaction.o sigaltstack.o socket.o socketpair.o stat.o statfs.o \
|
||||
swapon.o symlink.o sync.o umask.o unlink.o unmount.o \
|
||||
utimes.o vadvise.o wait4.o write.o writev.o __syscall.o __sysctl.o
|
||||
|
Loading…
Reference in New Issue
Block a user