From owner-freebsd-hackers Tue Jan 23 12:56:37 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA15957 for hackers-outgoing; Tue, 23 Jan 1996 12:56:37 -0800 (PST) Received: from miller.cs.uwm.edu (miller.cs.uwm.edu [129.89.9.13]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id MAA15800 for ; Tue, 23 Jan 1996 12:54:06 -0800 (PST) Received: (from james@localhost) by miller.cs.uwm.edu (8.7.3/8.7.3) id OAA14413; Tue, 23 Jan 1996 14:53:52 -0600 Date: Tue, 23 Jan 1996 14:53:52 -0600 From: Jim Lowe Message-Id: <199601232053.OAA14413@miller.cs.uwm.edu> To: terry@lambert.org Subject: Re: Amancio's tv program with capture! Cc: dufault@hda.com, hackers@FreeBSD.org, hasty@rah.star-gate.com, jkh@time.cdrom.com, luigi@labinfo.iet.unipi.it, multimedia@rah.star-gate.com Sender: owner-hackers@FreeBSD.org Precedence: bulk > > How does one mark the driver/mmapped memory as shared memory > > with the current utilities? It isn't real obvious that one can > > actually do this without modifiying the shmat system call (or at > > least to me). > > > int fd; > caddr_t mapaddr; > > if( ( fd = open( DEV_NAME, O_RDWR)) == -1) { > perror( "open"); > exit( 1); > } > > mapaddr = mmap( 0, /* map here, 0 = don't care*/ > DEV_MEM_SIZE, /* device memory window*/ > PROT_READ|PROT_WRITE, /* will be reading/writing*/ > MAP_HASSEMAPHORE, /* (?) prevent caching*/ > fd, /* fd for device*/ > (off_t)0 /* full window*/ > ); > I know how to mmap. The question is once you have mapaddr how does one attach that to X's shared memory functions through the Xshm utilities? I don't beleive I have ever head of map_hassemaphore... -Jim