Skip to content

Commit 7960770

Browse files
qukhanxnnpack-bot
authored andcommitted
Refactor convolution-nchw kernels create functions.
PiperOrigin-RevId: 817650789
1 parent f8b8db8 commit 7960770

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/pthreads.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static uint32_t thread_wrap_up(struct pthreadpool* threadpool,
432432
return curr_active_threads;
433433
}
434434

435-
static void* thread_main(void* arg);
435+
static int thread_main(void* arg);
436436

437437
static void ensure_num_threads(struct pthreadpool* threadpool,
438438
uint32_t thread_id) {
@@ -476,7 +476,7 @@ static void ensure_num_threads(struct pthreadpool* threadpool,
476476
}
477477
}
478478

479-
static void* thread_main(void* arg) {
479+
static int thread_main(void* arg) {
480480
// Unpack the argument, i.e. extract the pointer to the `pthreadpool` from the
481481
// provided pointer to this thread's `thread_info`.
482482
struct thread_info* thread = (struct thread_info*)arg;
@@ -558,7 +558,7 @@ static void* thread_main(void* arg) {
558558
// Release our hold on the threadpool.
559559
pthreadpool_release(threadpool);
560560

561-
return NULL;
561+
return 0;
562562
}
563563

564564
static size_t get_num_cpus() {

src/threadpool-atomics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static inline void pthreadpool_cond_broadcast(pthreadpool_cond_t* cond) {
8585
pthread_cond_broadcast(cond);
8686
}
8787
static inline void pthreadpool_thread_create(pthreadpool_thread_t* thread,
88-
void*(fun)(void*), void* arg) {
88+
int(fun)(void*), void* arg) {
8989
pthread_create(thread, NULL, fun, arg);
9090
}
9191
static inline void pthreadpool_thread_join(pthreadpool_thread_t thread,

0 commit comments

Comments
 (0)