~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/os0thread.h

  • Committer: Monty Taylor
  • Date: 2008-08-04 19:37:18 UTC
  • mto: (261.2.2 codestyle)
  • mto: This revision was merged to the branch mainline in revision 262.
  • Revision ID: monty@inaugust.com-20080804193718-f0rz13uli4429ozb
Changed gettext_noop() to N_()

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
 
42
42
/*******************************************************************
43
43
Compares two thread ids for equality. */
44
 
UNIV_INTERN
 
44
 
45
45
ibool
46
46
os_thread_eq(
47
47
/*=========*/
51
51
/********************************************************************
52
52
Converts an OS thread id to a ulint. It is NOT guaranteed that the ulint is
53
53
unique for the thread though! */
54
 
UNIV_INTERN
 
54
 
55
55
ulint
56
56
os_thread_pf(
57
57
/*=========*/
63
63
and returns a ulint.
64
64
NOTE: We count the number of threads in os_thread_exit(). A created
65
65
thread should always use that to exit and not use return() to exit. */
66
 
UNIV_INTERN
 
66
 
67
67
os_thread_t
68
68
os_thread_create(
69
69
/*=============*/
78
78
                                                function */
79
79
        os_thread_id_t*         thread_id);     /* out: id of the created
80
80
                                                thread, or NULL */
81
 
 
 
81
int
 
82
os_thread_join(
 
83
/*===========*/
 
84
  os_thread_id_t  thread_id);   /* in: id of the thread to join */
82
85
/*********************************************************************
83
86
Exits the current thread. */
84
 
UNIV_INTERN
 
87
 
85
88
void
86
89
os_thread_exit(
87
90
/*===========*/
89
92
                                is cast as a DWORD */
90
93
/*********************************************************************
91
94
Returns the thread identifier of current thread. */
92
 
UNIV_INTERN
 
95
 
93
96
os_thread_id_t
94
97
os_thread_get_curr_id(void);
95
98
/*========================*/
96
99
/*********************************************************************
97
100
Returns handle to the current thread. */
98
 
UNIV_INTERN
 
101
 
99
102
os_thread_t
100
103
os_thread_get_curr(void);
101
104
/*====================*/
102
105
/*********************************************************************
103
106
Advises the os to give up remainder of the thread's time slice. */
104
 
UNIV_INTERN
 
107
 
105
108
void
106
109
os_thread_yield(void);
107
110
/*=================*/
108
111
/*********************************************************************
109
112
The thread sleeps at least the time given in microseconds. */
110
 
UNIV_INTERN
 
113
 
111
114
void
112
115
os_thread_sleep(
113
116
/*============*/
114
117
        ulint   tm);    /* in: time in microseconds */
115
118
/**********************************************************************
116
119
Gets a thread priority. */
117
 
UNIV_INTERN
 
120
 
118
121
ulint
119
122
os_thread_get_priority(
120
123
/*===================*/
122
125
        os_thread_t     handle);/* in: OS handle to the thread */
123
126
/**********************************************************************
124
127
Sets a thread priority. */
125
 
UNIV_INTERN
 
128
 
126
129
void
127
130
os_thread_set_priority(
128
131
/*===================*/
130
133
        ulint           pri);   /* in: priority: one of OS_PRIORITY_... */
131
134
/**********************************************************************
132
135
Gets the last operating system error code for the calling thread. */
133
 
UNIV_INTERN
 
136
 
134
137
ulint
135
138
os_thread_get_last_error(void);
136
139
/*==========================*/