summaryrefslogtreecommitdiff
path: root/lib/thread.h
diff options
context:
space:
mode:
authorChristian Hopps <chopps@labn.net>2022-02-24 01:43:48 -0500
committerGitHub <noreply@github.com>2022-02-24 01:43:48 -0500
commit7bf63db79b7848b73e1cef49f3496038644bea16 (patch)
tree2c95921d910689673348e60f9614de7d9d00c4e7 /lib/thread.h
parentca6c97340b013e140c0cb31737858f7c672b7dfb (diff)
parentcc9f21da2218d95567eff1501482ce58e6600f54 (diff)
Merge pull request #10632 from donaldsharp/thread_return_null
*: Change thread->func to return void instead of int
Diffstat (limited to 'lib/thread.h')
-rw-r--r--lib/thread.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/thread.h b/lib/thread.h
index 0c2a4ba869..a2049ae52a 100644
--- a/lib/thread.h
+++ b/lib/thread.h
@@ -114,7 +114,7 @@ struct thread {
struct thread_timer_list_item timeritem;
struct thread **ref; /* external reference (if given) */
struct thread_master *master; /* pointer to the struct thread_master */
- int (*func)(struct thread *); /* event function */
+ void (*func)(struct thread *); /* event function */
void *arg; /* event argument */
union {
int val; /* second argument of the event. */
@@ -134,7 +134,7 @@ struct thread {
#endif
struct cpu_thread_history {
- int (*func)(struct thread *);
+ void (*func)(struct thread *);
atomic_size_t total_cpu_warn;
atomic_size_t total_wall_warn;
atomic_size_t total_starv_warn;
@@ -227,32 +227,32 @@ extern void thread_master_free_unused(struct thread_master *);
extern void _thread_add_read_write(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg,
+ void (*fn)(struct thread *), void *arg,
int fd, struct thread **tref);
extern void _thread_add_timer(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg, long t,
+ void (*fn)(struct thread *), void *arg, long t,
struct thread **tref);
extern void _thread_add_timer_msec(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg,
+ void (*fn)(struct thread *), void *arg,
long t, struct thread **tref);
extern void _thread_add_timer_tv(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg,
+ void (*fn)(struct thread *), void *arg,
struct timeval *tv, struct thread **tref);
extern void _thread_add_event(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg, int val,
+ void (*fn)(struct thread *), void *arg, int val,
struct thread **tref);
extern void _thread_execute(const struct xref_threadsched *xref,
struct thread_master *master,
- int (*fn)(struct thread *), void *arg, int val);
+ void (*fn)(struct thread *), void *arg, int val);
extern void thread_cancel(struct thread **event);
extern void thread_cancel_async(struct thread_master *, struct thread **,