summaryrefslogtreecommitdiff
path: root/include/my_pthread.h
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-02-28 18:14:56 -0700
committerunknown <malff/marcsql@weblab.(none)>2007-02-28 18:14:56 -0700
commit96b4e8ee01a1c39c0651614d5435ee7a201a3869 (patch)
tree5d5413ca065b58fc27c6a73c2eaf337f527295be /include/my_pthread.h
parent368f1859baf9f4b829aed67872dde783ee1767ad (diff)
parentdf5ba0fbf4257e973a75174310b9acbf031010b9 (diff)
downloadmariadb-git-96b4e8ee01a1c39c0651614d5435ee7a201a3869.tar.gz
Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt-merge include/my_pthread.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/partition_innodb.result: Auto merged mysql-test/t/disabled.def: Auto merged server-tools/instance-manager/IMService.cpp: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/ha_partition.cc: Auto merged sql/handler.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_subselect.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged
Diffstat (limited to 'include/my_pthread.h')
-rw-r--r--include/my_pthread.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 725a4fbc071..4df105e1b20 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -18,7 +18,6 @@
#ifndef _my_pthread_h
#define _my_pthread_h
-#include <errno.h>
#ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
@@ -85,6 +84,7 @@ typedef struct {
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
+#define pthread_self() win_pthread_self
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
@@ -140,7 +140,6 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define ETIMEDOUT 145 /* Win32 doesn't have this */
#define getpid() GetCurrentThreadId()
-#define pthread_self() win_pthread_self
#define HAVE_LOCALTIME_R 1
#define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
@@ -648,12 +647,14 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
+typedef ulong my_thread_id;
+
extern my_bool my_thread_global_init(void);
extern void my_thread_global_end(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern const char *my_thread_name(void);
-extern long my_thread_id(void);
+extern my_thread_id my_thread_dbug_id(void);
extern int pthread_no_free(void *);
extern int pthread_dummy(int);
@@ -680,7 +681,7 @@ struct st_my_thread_var
pthread_mutex_t * volatile current_mutex;
pthread_cond_t * volatile current_cond;
pthread_t pthread_self;
- long id;
+ my_thread_id id;
int cmp_length;
int volatile abort;
my_bool init;