Skip to content

Commit cdc3b6d

Browse files
author
Derick Rethans
committed
- Whitspace
1 parent 2a0fbde commit cdc3b6d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

TSRM/TSRM.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
112112
#elif defined(TSRM_WIN32)
113113
tls_key = TlsAlloc();
114114
#elif defined(BETHREADS)
115-
tls_key = tls_allocate();
115+
tls_key = tls_allocate();
116116
#endif
117117

118118
tsrm_error_file = stderr;
@@ -262,7 +262,7 @@ static void allocate_new_resource(tsrm_tls_entry **thread_resources_ptr, THREAD_
262262
#elif defined(TSRM_WIN32)
263263
TlsSetValue(tls_key, (void *) *thread_resources_ptr);
264264
#elif defined(BETHREADS)
265-
tls_set(tls_key, (void*) *thread_resources_ptr);
265+
tls_set(tls_key, (void*) *thread_resources_ptr);
266266
#endif
267267

268268
if (tsrm_new_thread_begin_handler) {
@@ -303,7 +303,7 @@ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id)
303303
#elif defined(TSRM_WIN32)
304304
thread_resources = TlsGetValue(tls_key);
305305
#elif defined(BETHREADS)
306-
thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
306+
thread_resources = (tsrm_tls_entry*)tls_get(tls_key);
307307
#else
308308
thread_resources = NULL;
309309
#endif
@@ -439,18 +439,18 @@ TSRM_API THREAD_T tsrm_thread_id(void)
439439
/* Allocate a mutex */
440440
TSRM_API MUTEX_T tsrm_mutex_alloc(void)
441441
{
442-
MUTEX_T mutexp;
442+
MUTEX_T mutexp;
443443
#ifdef NETWARE
444-
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
445-
NXHierarchy_t order = 0;
446-
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
444+
long flags = 0; /* Don't require NX_MUTEX_RECURSIVE, I guess */
445+
NXHierarchy_t order = 0;
446+
NX_LOCK_INFO_ALLOC (lockInfo, "PHP-TSRM", 0);
447447
#endif
448448

449449
#ifdef TSRM_WIN32
450-
mutexp = malloc(sizeof(CRITICAL_SECTION));
450+
mutexp = malloc(sizeof(CRITICAL_SECTION));
451451
InitializeCriticalSection(mutexp);
452452
#elif defined(NETWARE)
453-
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
453+
mutexp = NXMutexAlloc(flags, order, &lockInfo); /* return value ignored for now */
454454
#elif defined(GNUPTH)
455455
mutexp = (MUTEX_T) malloc(sizeof(*mutexp));
456456
pth_mutex_init(mutexp);
@@ -469,16 +469,16 @@ TSRM_API MUTEX_T tsrm_mutex_alloc(void)
469469
mutexp->sem = create_sem(1, "PHP sempahore");
470470
#endif
471471
#ifdef THR_DEBUG
472-
printf("Mutex created thread: %d\n",mythreadid());
472+
printf("Mutex created thread: %d\n",mythreadid());
473473
#endif
474-
return( mutexp );
474+
return( mutexp );
475475
}
476476

477477

478478
/* Free a mutex */
479479
TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
480480
{
481-
if (mutexp) {
481+
if (mutexp) {
482482
#ifdef TSRM_WIN32
483483
DeleteCriticalSection(mutexp);
484484
#elif defined(NETWARE)
@@ -498,9 +498,9 @@ TSRM_API void tsrm_mutex_free(MUTEX_T mutexp)
498498
delete_sem(mutexp->sem);
499499
free(mutexp);
500500
#endif
501-
}
501+
}
502502
#ifdef THR_DEBUG
503-
printf("Mutex freed thread: %d\n",mythreadid());
503+
printf("Mutex freed thread: %d\n",mythreadid());
504504
#endif
505505
}
506506

@@ -513,7 +513,7 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
513513
EnterCriticalSection(mutexp);
514514
return 1;
515515
#elif defined(NETWARE)
516-
return NXLock(mutexp);
516+
return NXLock(mutexp);
517517
#elif defined(GNUPTH)
518518
return pth_mutex_acquire(mutexp, 0, NULL);
519519
#elif defined(PTHREADS)
@@ -526,8 +526,8 @@ TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp)
526526
return st_mutex_lock(mutexp);
527527
#elif defined(BETHREADS)
528528
if (atomic_add(&mutexp->ben, 1) != 0)
529-
return acquire_sem(mutexp->sem);
530-
return 0;
529+
return acquire_sem(mutexp->sem);
530+
return 0;
531531
#endif
532532
}
533533

@@ -552,8 +552,8 @@ TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp)
552552
#elif defined(TSRM_ST)
553553
return st_mutex_unlock(mutexp);
554554
#elif defined(BETHREADS)
555-
if (atomic_add(&mutexp->ben, -1) != 1)
556-
return release_sem(mutexp->sem);
555+
if (atomic_add(&mutexp->ben, -1) != 1)
556+
return release_sem(mutexp->sem);
557557
return 0;
558558
#endif
559559
}

0 commit comments

Comments
 (0)