Message queue support
Fri Jun 27 00:09:00 GMT 2003
The mq_xxxx functions rely on /dev/shm being set up. The shmfs support was
added as part of late 2.3.x kernels. Unlike glibc, newlib doesn't bother hunting
for other locations. If you need to, change the mqlocal.h file to
reset the prefix name. If the problem is common-enough, I can make it a compile
option and tie it to configuration.
Newlib linux support may not work 100% on older kernels. Newlib has assumed 2.4 or greater
kernels and has not implemented back-level support like glibc does for certain syscalls.
Older kernels can be used but an application may run into problems if accessing features
requiring a more modern kernel.
-- Jeff J.
Jose Miguel Goncalves wrote:
> I would like to know in what level the newlib implementation of POSIX
> message queues (mq_open, mq_send, etc..) depends on the linux kernel?
> I've tried a simple example of using message queues and it fails on a
> mq_open() call to create a queue. Digging in the source code with GDB I
> see that mq_open() fails when it tries to open a shared memory file:
> /* attempt to open the shared memory file for exclusive create so
> we know
> whether we are the owners or not */
> fd = open (real_name, O_RDWR | O_CREAT | O_EXCL, mode);
> if (fd < 0 && (oflag & O_EXCL))
> /* we failed and the user wanted exclusive create */
> JosÃ© GonÃ§alves
More information about the Newlib