diff --git a/src/libhsakmt.c b/src/libhsakmt.c index 9236b8e280..a9e250d087 100644 --- a/src/libhsakmt.c +++ b/src/libhsakmt.c @@ -18,7 +18,7 @@ int kmtIoctl(int fd, unsigned long request, void *arg) * make any subsequent hsaKmt calls fail in CHECK_KFD_OPEN. */ pr_err("KFD file descriptor not valid in this process\n"); - hsakmt_forked = true; + is_forked_child(); } return ret; diff --git a/src/libhsakmt.h b/src/libhsakmt.h index f929833d28..411cdec512 100644 --- a/src/libhsakmt.h +++ b/src/libhsakmt.h @@ -196,4 +196,6 @@ void clear_events_page(void); void fmm_clear_all_mem(void); void clear_process_doorbells(void); uint32_t get_num_sysfs_nodes(void); + +bool is_forked_child(void); #endif diff --git a/src/openclose.c b/src/openclose.c index 11f930f486..eb9b6080a0 100644 --- a/src/openclose.c +++ b/src/openclose.c @@ -48,7 +48,7 @@ int zfb_support; * because the process can fork without calling the fork function in * libc (using clone or calling the system call directly). */ -static bool is_forked_child(void) +bool is_forked_child(void) { pid_t cur_pid;