~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/os/os0thread.c

  • Committer: Monty Taylor
  • Date: 2010-12-03 19:56:07 UTC
  • mto: (1975.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1976.
  • Revision ID: mordred@inaugust.com-20101203195607-yw50aynlw04dt5k6
All protocol stuff except for the buffer_length. WTF?

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
165
165
                exit(1);
166
166
        }
167
167
#endif
 
168
#ifdef __NETWARE__
 
169
        ret = pthread_attr_setstacksize(&attr,
 
170
                                        (size_t) NW_THD_STACKSIZE);
 
171
        if (ret) {
 
172
                fprintf(stderr,
 
173
                        "InnoDB: Error: pthread_attr_setstacksize"
 
174
                        " returned %d\n", ret);
 
175
                exit(1);
 
176
        }
 
177
#endif
168
178
        os_mutex_enter(os_sync_mutex);
169
179
        os_thread_count++;
170
180
        os_mutex_exit(os_sync_mutex);
245
255
/*=================*/
246
256
{
247
257
#if defined(__WIN__)
248
 
        SwitchToThread();
 
258
        Sleep(0);
249
259
#elif (defined(HAVE_SCHED_YIELD) && defined(HAVE_SCHED_H))
250
260
        sched_yield();
251
261
#elif defined(HAVE_PTHREAD_YIELD_ZERO_ARG)
268
278
{
269
279
#ifdef __WIN__
270
280
        Sleep((DWORD) tm / 1000);
 
281
#elif defined(__NETWARE__)
 
282
        delay(tm / 1000);
271
283
#else
272
284
        struct timeval  t;
273
285
 
315
327
ulint
316
328
os_thread_get_priority(
317
329
/*===================*/
318
 
        os_thread_t     /*handle __attribute__((unused))*/)
 
330
        os_thread_t     handle __attribute__((unused)))
319
331
                                /*!< in: OS handle to the thread */
320
332
{
321
333
#ifdef __WIN__