[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ISO C11 threads

From: Kevin Cox
Subject: ISO C11 threads
Date: Sat, 15 Mar 2014 11:47:37 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hello all,

I have been looking at the project suggestions for glibc and the C11
threading has really caught my eye.  I have been using posix threads and
c for a long time and I thing it would be great to implement this API.

I feel that I have all the skills required including years of c
experience (mostly pet projects) and using the pthreads API a number of
times.  I have looked at the C11 API and it appears to map fairly
cleanly to pthreads.

I am just starting on my proposal and wanted to throw some of my main
ideas here so that suggestions can be made before I submit my first draft.

Other than implementing the required API my main thought is that
interoperability between pthreads and C11 threads should be allowed.  I
am considering having thrd_t values be equivalent to pthread_t values so
that if you wanted to call an advanced feature from pthread you don't
need to abandon C11 threads.  The downside to this is it could possible
become awkward in the future if additional data was needed to be stored
by the C11 threads.  Therefore the other solution would be to have an
additional function which returned a pthread_t associated with a thrd_t
(which could be an identity macro for the foreseeable future).

I would also like to do a similar thing for mutexes and condition
variables if possible (I need to look into this a bit more).

The other main feature is extensive tests.  Testing multithreaded
applications can be hard but I think it is important to ensure correctness.

How does this sound?  I would appreciate and feedback and suggestions
about other key points.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]