Chromium Code Reviews| Index: src/untrusted/pthread/nc_mutex.c |
| diff --git a/src/untrusted/pthread/nc_mutex.c b/src/untrusted/pthread/nc_mutex.c |
| index 9e01f0a23894935560a52b71158ddac3c92de572..e7e56da53d99e47dca9c8916b29622ec74cfc1a2 100644 |
| --- a/src/untrusted/pthread/nc_mutex.c |
| +++ b/src/untrusted/pthread/nc_mutex.c |
| @@ -36,8 +36,8 @@ int pthread_mutex_validate(pthread_mutex_t *mutex) { |
| return rv; |
| } |
| -int pthread_mutex_init (pthread_mutex_t *mutex, |
| - const pthread_mutexattr_t *mutex_attr) { |
| +int pthread_mutex_init(pthread_mutex_t *mutex, |
| + const pthread_mutexattr_t *mutex_attr) { |
| int retval; |
| nc_token_init(&mutex->token, 1); |
| if (mutex_attr != NULL) { |
| @@ -50,7 +50,7 @@ int pthread_mutex_init (pthread_mutex_t *mutex, |
| return retval; |
| } |
| -int pthread_mutex_destroy (pthread_mutex_t *mutex) { |
| +int pthread_mutex_destroy(pthread_mutex_t *mutex) { |
| int retval; |
| pthread_mutex_validate(mutex); |
| if (NACL_PTHREAD_ILLEGAL_THREAD_ID != mutex->owner_thread_id) { |
| @@ -105,15 +105,15 @@ static int nc_thread_mutex_lock(pthread_mutex_t *mutex, int try_only) { |
| return 0; |
| } |
| -int pthread_mutex_trylock (pthread_mutex_t *mutex) { |
| +int pthread_mutex_trylock(pthread_mutex_t *mutex) { |
| return nc_thread_mutex_lock(mutex, 1); |
| } |
| -int pthread_mutex_lock (pthread_mutex_t *mutex) { |
| +int pthread_mutex_lock(pthread_mutex_t *mutex) { |
| return nc_thread_mutex_lock(mutex, 0); |
| } |
| -int pthread_mutex_unlock (pthread_mutex_t *mutex) { |
| +int pthread_mutex_unlock(pthread_mutex_t *mutex) { |
| pthread_mutex_validate(mutex); |
| if (mutex->mutex_type != PTHREAD_MUTEX_FAST_NP) { |
| if ((PTHREAD_MUTEX_RECURSIVE_NP == mutex->mutex_type) && |
| @@ -141,13 +141,13 @@ int pthread_mutex_unlock (pthread_mutex_t *mutex) { |
| * the mutex definitions, so that it overrides the weak symbol in the libstdc++ |
| * library. Otherwise we get calls through address zero. |
| */ |
| -int pthread_once(pthread_once_t* __once_control, |
| - void (*__init_routine) (void)) { |
| +int pthread_once(pthread_once_t *__once_control, |
|
Roland McGrath
2012/12/04 00:04:20
It's also a style violation (or should be) that th
Mark Seaborn
2012/12/05 05:10:57
Done.
|
| + void (*__init_routine)(void)) { |
| /* |
| * NOTE(gregoryd): calling pthread_once from __init_routine providing the same |
| * __once_control argument is an error and will cause a deadlock |
| */ |
| - volatile AtomicInt32* pdone = &__once_control->done; |
| + volatile AtomicInt32 *pdone = &__once_control->done; |
| if (*pdone == 0) { |
| /* not done yet */ |
| pthread_mutex_lock(&__once_control->lock); |