Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pacbell!att-ih!alberta!ubc-cs!fornax!bby-bc!john From: john@bby-bc.UUCP (john) Newsgroups: comp.unix.microport Subject: shared memory?? Message-ID: <259@bby-bc.UUCP> Date: 17 Mar 88 20:28:59 GMT Organization: Burnaby, British Columbia, Canada Lines: 29 I'm trying to use shared memory to access a frame buffer and it doesn't seem to work. I am running 2.2L. I put the appropriate shmcreate lines in /etc/rc.d/shm.rc but when my program runs nothing seems to happen (I check for error returns and from shmat and shmget but no error indication is given). to check it out I tried the tiny programbelow to try and write some high intensity "A"'s to the herc. mono adapter. The program runs in a couple of seconds but nothing changes on the screens. The only thing I have noticed is that in system5.nm shmat() is listed as an int rather than a char * Any hints/suggestions are welcome; thanks! john ...!ubc-vision!fornax!bby-bc!john program below compiled by cc -Ml prog.c main (argc,argv) int argc; char **argv; { extern char *shmat(); int shmid=shmget(0xb0000,32768,0); char *shmaddr = shmat(shmid,(char *)0); unsigned int i; for (i=0; i<32000; i++) {*shmaddr++ = 65; *shmaddr++ = 15;}; }