ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: no shared POSIX mutexes in 2.6.21-ts

To:
Subject: Re: [ts-7000] Re: no shared POSIX mutexes in 2.6.21-ts
From: Clark Dunson <>
Date: Fri, 20 May 2011 08:58:32 -0700


Hey thanks Mitch!  I'll look into it.  Meantime, 
I recoded with the #ifdef to use sysV semaphores.
semget(), etc.  We'll see how well they do over time.

Now looking about the kernels on TS' FTP site, I 
see many with 'rt' as an extension, and I see others
'out there' using shared POSIX semaphores on 
versions as early as 2.6.19.

This tree:


does not build as an rt, though it is apparently the
recommended one.  It's as good a time as any to 
learn, it's a patch, right?

cheers

On May 20, 2011, at 7:26 AM, al wrote:

 

I faced the same issue a few months ago and eventually found a good
alternative in Posix thread support. The routines to create and use the pthread_mutex_xxx() calls are available, but you will have to change your make file to include these linker options: -lpthread -lrt

Posix thread mutexes are actually better than process oriented mutexes in that they allow you to design multi-threaded applications.

What I do not like is the lack of full Posix real-time extensions, despite the "-lrt" option. The kernel was not built with real-time support, so priority inversion is an issue you must deal with as best you can. Careful thread design and thread priority setting helped address that issue for me.

Check out the full Posix API at:

http://pubs.opengroup.org/onlinepubs/9699919799/toc.htm

Regards, Mitch

--- In , "Clark" <> wrote:
>
> "#define _POSIX_THREAD_PROCESS_SHARED -1" in the libc in the ts7260-linux2.6-etch.dd.bz2 image, plus getting ENOSYS back from sem_open(blah,blah,blah,1) seems pretty conclusive. Yet I also get back ENOSYS from sem_open(blah,blah,blah,0) which doesn't seem right since _POSIX_SEMAPHORES is defined to be 200112L.
>
> There's a bunch of online posts about /dev/shm being not truly tmpfs, but rather ramfs ala CONFIG_TINY_SHMEM, and how config options can cause the ENOSYS. Tried many mounting options, no joy. Anyone else using named POSIX mutexes across processes in 2.6.21-ts, or have a clue? Thanks!
>
>
> The config file I am using sets:
>
> # General setup
> #
> CONFIG_LOCALVERSION=""
> # CONFIG_LOCALVERSION_AUTO is not set
> CONFIG_SWAP=y
> CONFIG_SYSVIPC=y
> CONFIG_IPC_NS=y
> CONFIG_SYSVIPC_SYSCTL=y
> CONFIG_POSIX_MQUEUE=y
> # CONFIG_BSD_PROCESS_ACCT is not set
> # CONFIG_TASKSTATS is not set
> # CONFIG_UTS_NS is not set
> # CONFIG_AUDIT is not set
> CONFIG_IKCONFIG=m
> CONFIG_IKCONFIG_PROC=y
> # CONFIG_SYSFS_DEPRECATED is not set
> # CONFIG_RELAY is not set
> CONFIG_BLK_DEV_INITRD=y
> CONFIG_INITRAMFS_SOURCE=""
> # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
> CONFIG_SYSCTL=y
> CONFIG_EMBEDDED=y
> CONFIG_UID16=y
> CONFIG_SYSCTL_SYSCALL=y
> CONFIG_KALLSYMS=y
> CONFIG_KALLSYMS_EXTRA_PASS=y
> CONFIG_HOTPLUG=y
> CONFIG_PRINTK=y
> # CONFIG_BUG is not set
> # CONFIG_ELF_CORE is not set
> CONFIG_BASE_FULL=y
> CONFIG_FUTEX=y
> CONFIG_EPOLL=y
> CONFIG_SHMEM=y
> CONFIG_SLAB=y
> # CONFIG_VM_EVENT_COUNTERS is not set
> CONFIG_RT_MUTEXES=y
> # CONFIG_TINY_SHMEM is not set
> CONFIG_BASE_SMALL=0
> # CONFIG_SLOB is not set
>
> and
>
> #
> # Pseudo filesystems
> #
> CONFIG_PROC_FS=y
> CONFIG_PROC_SYSCTL=y
> CONFIG_SYSFS=y
> CONFIG_TMPFS=y
> CONFIG_TMPFS_POSIX_ACL=y
> # CONFIG_HUGETLB_PAGE is not set
> CONFIG_RAMFS=y
> # CONFIG_CONFIGFS_FS is not set
>




__._,_.___


Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: =Email Delivery: Digest | m("yahoogroups.com?subject","ts-7000-fullfeatured");=Change Delivery Format: Fully Featured">Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | =Unsubscribe

__,_._,___
<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU