FW: [Buildroot] Uclibc shared memory support
Muktabh Anchlia
m_anchlia at hotmail.com
Mon Mar 2 16:14:41 UTC 2009
Hello,
I wish to know if POSIX semaphores are supported in uclibc's latest release or not. Searching the archives, I saw a post asking to look at the file /trunk/uClibc/libpthread/linuxthreads/semaphore.c where the routines for sem_init, sem_wait etc have been defined. I compiled a new buildroot image with this version of uclibc. Now when I try to compile the code, I get an error saying "undefined reference to `sem_init'"
I included the file semaphore.h and compiled using the command " sudo ./i686-linux-uclibc-gcc -I~/buildroot/build_i686/staging_dir/usr/include/ -L~/buildroot/build_i686/staging_dir/usr/lib main.c -o main.out"
Is there something I am missing?
thanks
Muktabh
From: antab at valka.is
To: m_anchlia at hotmail.com
Subject: Re: [Buildroot] Uclibc shared memory support
Date: Wed, 25 Feb 2009 19:27:43 +0100
Hi.
No problem and yes you are correct.
On Feb 25, 2009, at 7:23 PM, Muktabh Anchlia wrote:Hi Antab,
thanks. Just to be sure operations like semget,semcntl, semop, shmctl,shmget etc will work without a prob, but sem_wait, sem_post etc (as defined in semaphore.h) will not work. Am I corect?
Regards,
Muktabh
" I don't take sides, just the racing line "
CC: buildroot at busybox.net
From: antab at valka.is
To: m_anchlia at hotmail.com
Subject: Re: [Buildroot] Uclibc shared memory support
Date: Wed, 25 Feb 2009 17:55:29 +0100
This is more of a question for the uclibc mailing list, but anyway.
sysv shared memory and semaphores work out of the box. POSIX shared memory and semaphores on the other hand is not supported in uclibc last time i checked.There is a patch floating around the uclibc mailing list that adds posix shared memory. If you dont want to go thru the steps of patching uclibc then you can just copy the shm_open and shm_unlock from the patch (or glibc) and build them with your app (thous 2 are really simple).Not sure about status of posix semaphores but wrapping sysv sem in posix api is easy if you need the posix api.
On Feb 25, 2009, at 5:44 PM, Muktabh Anchlia wrote:Hi,
I am not sure of this is the correct place to ask this question, but I would like to know if anyone has used shared memory/semaphores/mmap with uclibc built using buildroot. I searched the uclibc mailing list, but references to shared memory support are too old(year 200-2001) to be verifiable.
Thanks
Muktabh
" I don't take sides, just the racing line "
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Greets Arnar Mar Sig
Valka ehf
Greets Arnar Mar Sig
Valka ehf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/uclibc/attachments/20090302/99060ef0/attachment.htm>
More information about the uClibc
mailing list