[Xpert]XFree86, FreeBSD, and Shared memory

2002-03-04 Thread Andy Ritger


Hi all, I have a few questions about the libc wrapper layer on FreeBSD,
and its implementation of xf86shmat() and friends.

On FreeBSD, XFree86's libc wrapper is:

xc/programs/Xserver/hw/xfree86/os-support/bsd/libc_wrapper.c

which is a symlink to:

xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c

There are two implementations of xf86shmget(), xf86shmat(), xf86shmctl(),
and xf86shmdt() in libc_wrapper.c:

- an implementation that just calls into the C library via shmget(),
shmat(), shmdt() and shmctl(); this implementation is protected by #ifdef
HAVE_SYSV_IPC

- an implementation that is used when HAVE_SYSV_IPC is not defined; in
this case, the four functions each just return -1.

It seems that HAVE_SYSV_IPC is not defined by default.  Is there a more
correct way to enable it, rather than just adding -DHAVE_SYSV_IPC to
the DefaultCCOptions in my host.def?

When I do define HAVE_SYSV_IPC, then I hit a problem with the
implementation of xf86shmat():


char *
xf86shmat(int id, char *addr, int xf86shmflg)
{
int shmflg = 0;

if (xf86shmflg  XF86SHM_RDONLY) shmflg |= SHM_RDONLY;
if (xf86shmflg  XF86SHM_RND) shmflg|= SHM_RND;
if (xf86shmflg  XF86SHM_REMAP) shmflg  |= SHM_REMAP;

return shmat(id,addr,shmflg);
}

complaining that SHM_REMAP isn't defined.  Grepping in /usr/include/, I
couldn't find SHM_REMAP.  Does anyone know if this doesn't exist on
FreeBSD?

I'm using FreeBSD-4.5 (haven't tried any of this on -CURRENT, yet).

I'm a little confused how XFree86 could use shared memory with the current
CVS code.  Does anyone know anything about this?

Thanks,
- Andy Ritger
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]XFree86, FreeBSD, and Shared memory

2002-03-04 Thread Andy Ritger


I was curious why the MIT-SHM extension works, even with these noop
xf86shm*() entry points.  The implementation of MIT-SHM:

xc/programs/Xserver/Xext/shm.c

Makes system calls directly, rather than going through the libc_wrapper.

- Andy Ritger


 Hi all, I have a few questions about the libc wrapper layer on FreeBSD,
 and its implementation of xf86shmat() and friends. On FreeBSD, XFree86's
 libc wrapper is:

   xc/programs/Xserver/hw/xfree86/os-support/bsd/libc_wrapper.c

 which is a symlink to:

   xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c

 There are two implementations of xf86shmget(), xf86shmat(),
 xf86shmctl(), and xf86shmdt() in libc_wrapper.c:

 - an implementation that just calls into the C library via shmget(),
 shmat(), shmdt() and shmctl(); this implementation is protected by
 #ifdef HAVE_SYSV_IPC

 - an implementation that is used when HAVE_SYSV_IPC is not
 defined; in this case, the four functions each just return -1.

 It seems that HAVE_SYSV_IPC is not defined by default.  Is there a more
 correct way to enable it, rather than just adding -DHAVE_SYSV_IPC to
 the DefaultCCOptions in my host.def?

 When I do define HAVE_SYSV_IPC, then I hit a problem with the
 implementation of xf86shmat():

 char *
 xf86shmat(int id, char *addr, int xf86shmflg)
 {
 int shmflg = 0;

 if (xf86shmflg  XF86SHM_RDONLY) shmflg |= SHM_RDONLY;
 if (xf86shmflg  XF86SHM_RND) shmflg|= SHM_RND;
 if (xf86shmflg  XF86SHM_REMAP) shmflg  |= SHM_REMAP;

 return shmat(id,addr,shmflg);
 }

 complaining that SHM_REMAP isn't defined.  Grepping in /usr/include/,
 I couldn't find SHM_REMAP.  Does anyone know if this doesn't exist on
 FreeBSD?

 I'm using FreeBSD-4.5 (haven't tried any of this on -CURRENT, yet).

 I'm a little confused how XFree86 could use shared memory with the
 current CVS code.  Does anyone know anything about this?

Thanks,
- Andy Ritger
___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert



Re: [Xpert]Xv without the nvidia binary driver

2002-01-04 Thread Andy Ritger



On Sat, 5 Jan 2002, ephemeron wrote:

 With XFree86 4.1. it appears that downloading the nVidia binary drivers
 is the only way to get Xv working. Which can be a problem for those who
 aren't using an RPM-based system.

There are also tarballs available on NVIDIA's website.

- Andy Ritger


 Are there any plans for Xv support to
 be included in the xfree86 source?
 ___
 Xpert mailing list
 [EMAIL PROTECTED]
 http://XFree86.Org/mailman/listinfo/xpert

___
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert