瀏覽代碼

LibC: Implement pthread_testcancel

Clemens Wasser 2 年之前
父節點
當前提交
7c0286a5c2
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Userland/Libraries/LibC/pthread.cpp

+ 6 - 0
Userland/Libraries/LibC/pthread.cpp

@@ -553,6 +553,12 @@ int pthread_cancel(pthread_t thread)
     return pthread_kill(thread, SIGCANCEL);
 }
 
+// https://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_testcancel.html
+void pthread_testcancel(void)
+{
+    __pthread_maybe_cancel();
+}
+
 int pthread_setname_np(pthread_t thread, char const* name)
 {
     if (!name)