Use tmpfs for shm_open()?

Richard Gooch (Richard.Gooch@atnf.CSIRO.AU)
Fri, 19 Jun 1998 21:57:50 +1000


Hi, all. A random thought just popped into my head today: how about
implementing a tmpfs which could then be used as the basis of a simple
userspace (libc) implementation of POSIX shared memory, aka.
shm_open().

You would mount a tmpfs onto /shm and then code up shm_open() to do
something like:

if (tmpfs_not_available) squawk ();
if (not_mounted) {
mount -t tmpfs none /shm
not_mounted = FALSE;
}
return open ("/shm" path, ...);

We could kill two birds with one stone, giving a tmpfs to those who
believe it's faster than ext2fs :-), and giving us POSIX SHM too.

Regards,

Richard....

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu