diff options
author | Serapheim Dimitropoulos <[email protected]> | 2020-07-29 09:43:33 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-29 09:43:33 -0700 |
commit | 843e9ca2e1ef347cf6b0271ed84438afc145dfd4 (patch) | |
tree | 5aed2d7636105945e0ef2799bb066beb206be8a0 /include/sys/zthr.h | |
parent | 5678d3f59389a241c8d9c032513c38209bb53e70 (diff) |
Introduce names for ZTHRs
When debugging issues or generally analyzing the runtime of
a system it would be nice to be able to tell the different
ZTHRs running by name rather than having to analyze their
stack.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Matthew Ahrens <[email protected]>
Co-authored-by: Ryan Moeller <[email protected]>
Signed-off-by: Serapheim Dimitropoulos <[email protected]>
Closes #10630
Diffstat (limited to 'include/sys/zthr.h')
-rw-r--r-- | include/sys/zthr.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/sys/zthr.h b/include/sys/zthr.h index 0a05f5225..ae8c57e9e 100644 --- a/include/sys/zthr.h +++ b/include/sys/zthr.h @@ -24,10 +24,11 @@ typedef struct zthr zthr_t; typedef void (zthr_func_t)(void *, zthr_t *); typedef boolean_t (zthr_checkfunc_t)(void *, zthr_t *); -extern zthr_t *zthr_create(zthr_checkfunc_t checkfunc, - zthr_func_t *func, void *arg); -extern zthr_t *zthr_create_timer(zthr_checkfunc_t *checkfunc, - zthr_func_t *func, void *arg, hrtime_t nano_wait); +extern zthr_t *zthr_create(const char *zthr_name, + zthr_checkfunc_t checkfunc, zthr_func_t *func, void *arg); +extern zthr_t *zthr_create_timer(const char *zthr_name, + zthr_checkfunc_t *checkfunc, zthr_func_t *func, void *arg, + hrtime_t nano_wait); extern void zthr_destroy(zthr_t *t); extern void zthr_wakeup(zthr_t *t); |