diff options
author | unknown <heikki@hundin.mysql.fi> | 2002-08-13 01:22:27 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2002-08-13 01:22:27 +0300 |
commit | 465e56b04641381fda9934b3557232f85f8af845 (patch) | |
tree | 29f820e508d7dd701ca4962c9991b3b4b4ee02ba /innobase/include/os0thread.h | |
parent | 9a78f2fe0f2c37143bdb798cfcec38121d72be42 (diff) | |
download | mariadb-git-465e56b04641381fda9934b3557232f85f8af845.tar.gz |
os0thread.h, os0thread.c:
Fix a critical portability bug introduced in the Windows version
innobase/os/os0thread.c:
Fix a critical portability bug introduced in the Windows version
innobase/include/os0thread.h:
Fix a critical portability bug introduced in the Windows version
Diffstat (limited to 'innobase/include/os0thread.h')
-rw-r--r-- | innobase/include/os0thread.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/innobase/include/os0thread.h b/innobase/include/os0thread.h index 95a3a95fb74..9459750719f 100644 --- a/innobase/include/os0thread.h +++ b/innobase/include/os0thread.h @@ -25,33 +25,37 @@ can wait inside InnoDB */ #ifdef __WIN__ typedef void* os_thread_t; +typedef ulint os_thread_id_t; /* In Windows the thread id + is an unsigned long int */ #else typedef pthread_t os_thread_t; +typedef os_thread_t os_thread_id_t; /* In Unix we use the thread + handle itself as the id of + the thread */ #endif -#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 */ +Compares two 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 */ + os_thread_id_t a, /* in: OS thread or thread id */ + os_thread_id_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! */ +Converts an OS 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 */ + os_thread_id_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 @@ -69,10 +73,8 @@ os_thread_create( #endif void* arg, /* in: argument to start function */ - os_thread_id_t* thread_id); /* out: id of created - thread; currently this is - identical to the handle to - the thread */ + os_thread_id_t* thread_id); /* out: id of the created + thread */ /********************************************************************* A thread calling this function ends its execution. */ |