diff options
author | heikki@hundin.mysql.fi <> | 2002-08-06 22:59:13 +0300 |
---|---|---|
committer | heikki@hundin.mysql.fi <> | 2002-08-06 22:59:13 +0300 |
commit | 042facc475a7a1d7610aba66526965e5b5ec5261 (patch) | |
tree | 0ed7a5d28436450a6e79787357c337dfae761d1d /innobase/include/os0thread.h | |
parent | 5fadf19295e31a0332de4f1ed3362ba1ce51e4ab (diff) | |
download | mariadb-git-042facc475a7a1d7610aba66526965e5b5ec5261.tar.gz |
Many files:
Merge InnoDB-3.23.52d
Diffstat (limited to 'innobase/include/os0thread.h')
-rw-r--r-- | innobase/include/os0thread.h | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 0d6fa5a8f37..636cfd79e50 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -28,12 +28,30 @@ typedef void* os_thread_t; #else typedef pthread_t os_thread_t; #endif -typedef unsigned long int os_thread_id_t; + +#define os_thread_id_t os_thread_t /* Define a function pointer type to use in a typecast */ typedef void* (*os_posix_f_t) (void*); +/******************************************************************* +Compares two threads or thread ids for equality */ + +ibool +os_thread_eq( +/*=========*/ + /* out: TRUE if equal */ + os_thread_t a, /* in: OS thread or thread id */ + os_thread_t b); /* in: OS thread or thread id */ +/******************************************************************** +Converts an OS thread or thread id to a ulint. It is NOT guaranteed that +the ulint is unique for the thread though! */ +ulint +os_thread_pf( +/*=========*/ + /* out: unsigned long int */ + os_thread_t a); /* in: thread or thread id */ /******************************************************************** Creates a new thread of execution. The execution starts from the function given. The start function takes a void* parameter @@ -73,14 +91,6 @@ os_thread_t os_thread_get_curr(void); /*====================*/ /********************************************************************* -Converts a thread id to a ulint. */ - -ulint -os_thread_conv_id_to_ulint( -/*=======================*/ - /* out: converted to ulint */ - os_thread_id_t id); /* in: thread id */ -/********************************************************************* Waits for a thread to terminate. */ void |