Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 15 Jan 2015 07:52:27 -0500
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: First draft of new synccall, seems to be working

On Wed, Jan 14, 2015 at 11:33:15PM -0500, Rich Felker wrote:
> I just wrote the first draft of the new __synccall, used for
> multithreaded set*id(). All the concepts seem sound and seem to be
> working. It's missing the code to block creation of unboundedly more
> threads while __synccall is running, but otherwise everything's in
> place. Both the /proc/self/task processing logic and the PI futex
> logic seem to be working as expected. I haven't yet tested in the
> presence of multiple realtime priorities where there's a risk of some
> threads never getting a chance to run; I need a framework with a
> high-RT-prio supervisor process to kill the test if it runs too long,
> because I don't want to be rebooting boxes over and over to test. :)
> 
> Attached is the current draft of the code, as a source file rather
> than a patch since the whole file is basically rewritten. Comments
> welcome.

I had some synchronization logic errors (which would have been masked
by the timeout anyway, but still wrong) in the old version which I've
corrected, and I realized that most of the internal locking could be
replaced with atomics, which I've done. I still need to write the
pthread_create blocking.

New version attached.

Rich

View attachment "synccall.c" of type "text/plain" (4219 bytes)

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.