Return to BSD News archive
Newsgroups: comp.os.386bsd.development Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!spool.mu.edu!umn.edu!csus.edu!netcom.com!hasty From: hasty@netcom.com (Amancio Hasty Jr) Subject: Re: V86 mode Message-ID: <hastyCBw5nK.BFp@netcom.com> Organization: Netcom Online Communications Services (408-241-9760 login: guest) References: <BLYMN.93Aug8183114@siren.awadi.com.au> <245k5iINNrl0@bonnie.tcd-dresden.de> <BLYMN.93Aug15160515@siren.awadi.com.au> Date: Tue, 17 Aug 1993 06:50:07 GMT Lines: 218 In article <BLYMN.93Aug15160515@siren.awadi.com.au> blymn@awadi.com.au (Brett Lymn) writes: >>>>>> On 9 Aug 1993 15:41:06 +0200, j@bonnie.tcd-dresden.de (J Wunsch) said: >J> NNTP-Posting-Host: bonnie.tcd-dresden.de > >J> In <BLYMN.93Aug8183114@siren.awadi.com.au> blymn@awadi.com.au (Brett Lymn) writes: > >>I am attempting to port the Linux dosemu (actually xdos), my main >>stumbling block at the moment is lack of kernel services such as shm, >>sem and msg and of course v86. > >J> Yep, but shm is there, isn't it? Here are the bsdi patches that I mentioned before: I have not had the chance to try them out and it will be a couple of days before I can get to it. Good Luck, Amancio Hasty From: block@gmf.eds.com Message-Id: <9207120230.AA24302@snook.gmf.eds.com> Subject: sysv shared memory patches To: flipper.rsmas.miami.edu!angel@uunet.uu.net (Angel Li) Date: Sat, 11 Jul 92 22:30:01 EDT Cc: beta@bsdi.com In-Reply-To: <9207102221.AA23557@flipper.rsmas.miami.edu>; from "Angel Li" at Jul 10, 92 6:21 pm X-Mailer: ELM [version 2.3 PL11] Status: RO These patches will give you the library calls for sysv shared memory. Apply patches in your source directory, copy 'sys/sys/shm.h' to /usr/include/sys, and add an 'options SYSVSHM' line in your sys/i386/conf/????? file. -------------------------------------------------------------------------- diff -c sys/i386/include/vmparam.h:1.1.1.1 sys/i386/include/vmparam.h:1.2 *** sys/i386/include/vmparam.h:1.1.1.1 Sat Jul 11 18:10:55 1992 --- sys/i386/include/vmparam.h Sat Jul 11 18:10:55 1992 *************** *** 89,94 **** --- 89,99 ---- */ #define SYSPTSIZE (2*NPTEPG) #define USRPTSIZE (2*NPTEPG) + + /* + * Size of Shared Memory Pages + */ + #define SHMMAXPGS 1024 /* * Size of User Raw I/O map diff -c sys/sys/shm.h:1.1 sys/sys/shm.h:1.2 *** sys/sys/shm.h:1.1 Sat Jul 11 18:13:21 1992 --- sys/sys/shm.h Sat Jul 11 18:13:22 1992 *************** *** 91,94 **** --- 91,110 ---- struct shminfo shminfo; #endif + #ifndef KERNEL + #include <sys/cdefs.h> + + __BEGIN_DECLS + + int shmsys __P((int, ...)); + + int shmat __P((int, caddr_t, int)); + int shmget __P((key_t, int, int)); + int shmctl __P((int, int, caddr_t)); + int shmdt __P((caddr_t)); + + __END_DECLS + + #endif + #endif /* !_SHM_H_ */ diff -c lib/libc/gen/Makefile.inc:1.1 lib/libc/gen/Makefile.inc:1.2 *** lib/libc/gen/Makefile.inc:1.1 Sat Jul 11 18:16:12 1992 --- lib/libc/gen/Makefile.inc Sat Jul 11 18:16:13 1992 *************** *** 10,16 **** isatty.c isctype.c isinf.c mktemp.c nice.c nlist.c opendir.c \ pause.c popen.c psignal.c raise.c readdir.c \ rewinddir.c scandir.c seekdir.c setjmperr.c \ ! setmode.c setrgid.c setruid.c siginterrupt.c \ siglist.c signal.c sigsetops.c sleep.c syslog.c telldir.c \ termios.c time.c times.c timezone.c ttyname.c ttyslot.c \ ualarm.c unvis.c usleep.c utime.c valloc.c vis.c wait.c wait3.c \ --- 10,18 ---- isatty.c isctype.c isinf.c mktemp.c nice.c nlist.c opendir.c \ pause.c popen.c psignal.c raise.c readdir.c \ rewinddir.c scandir.c seekdir.c setjmperr.c \ ! setmode.c setrgid.c setruid.c \ ! shmat.c shmctl.c shmdt.c shmget.c \ ! siginterrupt.c \ siglist.c signal.c sigsetops.c sleep.c syslog.c telldir.c \ termios.c time.c times.c timezone.c ttyname.c ttyslot.c \ ualarm.c unvis.c usleep.c utime.c valloc.c vis.c wait.c wait3.c \ diff -c /dev/null lib/libc/gen/shmat.c:1.1 *** /dev/null Sat Jul 11 18:16:13 1992 --- lib/libc/gen/shmat.c Sat Jul 11 18:16:14 1992 *************** *** 0 **** --- 1,15 ---- + #include <sys/types.h> + #include <sys/ipc.h> + #include <sys/shm.h> + + #if __STDC__ + int shmat(int shmid, caddr_t shmaddr, int shmflg) + #else + int shmat(shmid, shmaddr, shmflg) + int shmid; + caddr_t shmaddr; + int shmflg; + #endif + { + return (shmsys(0, shmid, shmaddr, shmflg)); + } diff -c /dev/null lib/libc/gen/shmctl.c:1.1 *** /dev/null Sat Jul 11 18:16:14 1992 --- lib/libc/gen/shmctl.c Sat Jul 11 18:16:15 1992 *************** *** 0 **** --- 1,15 ---- + #include <sys/types.h> + #include <sys/ipc.h> + #include <sys/shm.h> + + #if __STDC__ + int shmctl(int shmid, int cmd, caddr_t buf) + #else + int shmctl(shmid, cmd, buf) + int shmid; + int cmd; + caddr_t buf; + #endif + { + return (shmsys(1, shmid, cmd, buf)); + } diff -c /dev/null lib/libc/gen/shmdt.c:1.1 *** /dev/null Sat Jul 11 18:16:15 1992 --- lib/libc/gen/shmdt.c Sat Jul 11 18:16:16 1992 *************** *** 0 **** --- 1,13 ---- + #include <sys/types.h> + #include <sys/ipc.h> + #include <sys/shm.h> + + #if __STDC__ + int shmdt(caddr_t shmaddr) + #else + int shmdt(shmaddr) + caddr_t shmaddr; + #endif + { + return (shmsys(2, shmaddr)); + } diff -c /dev/null lib/libc/gen/shmget.c:1.1 *** /dev/null Sat Jul 11 18:16:17 1992 --- lib/libc/gen/shmget.c Sat Jul 11 18:16:17 1992 *************** *** 0 **** --- 1,15 ---- + #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)); + } diff -c lib/libc/sys/Makefile.inc:1.1 lib/libc/sys/Makefile.inc:1.2 *** lib/libc/sys/Makefile.inc:1.1 Sat Jul 11 18:16:19 1992 --- lib/libc/sys/Makefile.inc Sat Jul 11 18:16:19 1992 *************** *** 25,32 **** seteuid.o setgid.o setgroups.o sethostid.o sethostname.o \ setitimer.o setpgid.o setpriority.o setregid.o setreuid.o \ setrlimit.o setsid.o setsockopt.o settimeofday.o setuid.o \ ! shutdown.o sigaction.o sigstack.o socket.o socketpair.o stat.o \ ! statfs.o swapon.o symlink.o sync.o truncate.o umask.o unlink.o \ unmount.o utimes.o vadvise.o wait4.o write.o writev.o PSEUDO= _exit.o _getlogin.o --- 25,32 ---- seteuid.o setgid.o setgroups.o sethostid.o sethostname.o \ setitimer.o setpgid.o setpriority.o setregid.o setreuid.o \ setrlimit.o setsid.o setsockopt.o settimeofday.o setuid.o \ ! shmsys.o shutdown.o sigaction.o sigstack.o socket.o socketpair.o \ ! stat.o statfs.o swapon.o symlink.o sync.o truncate.o umask.o unlink.o \ unmount.o utimes.o vadvise.o wait4.o write.o writev.o PSEUDO= _exit.o _getlogin.o -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Jon Block Internet: block@gmf.eds.com GMFanuc Robotics uucp: uunet!edsews!boozsh!block 2000 South Adams Road Voice: 313-377-7545 Auburn Hills, MI 48326-2800 FAX: 313-377-7477 -- This message brought to you by the letters X and S and the number 3 Amancio Hasty | Home: (415) 495-3046 | ftp-site depository of all my work: e-mail hasty@netcom.com | sunvis.rtpnc.epa.gov:/pub/386bsd/incoming