tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pthread library related
On May 19, 11:00am, soda%yuruyuru.net@localhost (SODA Noriyuki) wrote:
-- Subject: Re: pthread library related
| >>>>> On Thu, 19 May 2016 01:13:09 +0200,
| Martin Husemann <martin%duskware.de@localhost> said:
|
| > int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr,
| > int pshared)
| > {
| > return EINVAL;
| > }
|
| I think the following is better:
|
| int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr,
| int pshared)
| {
| switch (pshared) {
| case PTHREAD_PROCESS_PRIVATE:
| return 0;
| case PTHREAD_PROCESS_SHARED:
| return ENOSYS;
| }
| return EINVAL;
| }
Yes, that's better.
christos
Home |
Main Index |
Thread Index |
Old Index