Skip to content

Commit 434c7cc

Browse files
committed
rename thread_init to avoid runtime failure on AIX
patch by 'gwachter'
1 parent dda51c0 commit 434c7cc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

memcached.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5540,7 +5540,7 @@ int main (int argc, char **argv) {
55405540
exit(EX_OSERR);
55415541
}
55425542
/* start up worker threads if MT mode */
5543-
thread_init(settings.num_threads, main_base);
5543+
memcached_thread_init(settings.num_threads, main_base);
55445544

55455545
if (start_assoc_maintenance_thread() == -1) {
55465546
exit(EXIT_FAILURE);

memcached.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ static inline int mutex_lock(pthread_mutex_t *mutex)
547547
* also #define-d to directly call the underlying code in singlethreaded mode.
548548
*/
549549

550-
void thread_init(int nthreads, struct event_base *main_base);
550+
void memcached_thread_init(int nthreads, struct event_base *main_base);
551551
int dispatch_event_add(int thread, conn *c);
552552
void dispatch_conn_new(int sfd, enum conn_states init_state, int event_flags, int read_buffer_size, enum network_transport transport);
553553

thread.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static void setup_thread(LIBEVENT_THREAD *me) {
370370
static void *worker_libevent(void *arg) {
371371
LIBEVENT_THREAD *me = arg;
372372

373-
/* Any per-thread setup can happen here; thread_init() will block until
373+
/* Any per-thread setup can happen here; memcached_thread_init() will block until
374374
* all threads have finished initializing.
375375
*/
376376

@@ -778,7 +778,7 @@ void slab_stats_aggregate(struct thread_stats *stats, struct slab_stats *out) {
778778
* nthreads Number of worker event handler threads to spawn
779779
* main_base Event base for main thread
780780
*/
781-
void thread_init(int nthreads, struct event_base *main_base) {
781+
void memcached_thread_init(int nthreads, struct event_base *main_base) {
782782
int i;
783783
int power;
784784

0 commit comments

Comments
 (0)