~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to include/my_sys.h

  • Committer: Monty Taylor
  • Date: 2008-07-02 14:35:48 UTC
  • mto: This revision was merged to the branch mainline in revision 51.
  • Revision ID: monty@inaugust.com-20080702143548-onj30ry0sugr01uw
Removed all references to THREAD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <errno.h>
29
29
#define my_errno (errno)
30
30
 
31
 
#ifdef THREAD
32
31
#include <my_pthread.h>
33
 
#endif
34
32
 
35
33
#include <m_ctype.h>                    /* for CHARSET_INFO */
36
34
#include <stdarg.h>
274
272
{
275
273
  char *                name;
276
274
  enum file_type        type;
277
 
#if defined(THREAD) && !defined(HAVE_PREAD)
 
275
#if !defined(HAVE_PREAD)
278
276
  pthread_mutex_t       mutex;
279
277
#endif
280
278
};
294
292
  DYNAMIC_ARRAY full_list;
295
293
  char **list;
296
294
  uint cur, max;
297
 
#ifdef THREAD
298
295
  pthread_mutex_t mutex;
299
 
#endif
300
296
} MY_TMPDIR;
301
297
 
302
298
typedef struct st_dynamic_string
308
304
struct st_io_cache;
309
305
typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
310
306
 
311
 
#ifdef THREAD
312
307
typedef struct st_io_cache_share
313
308
{
314
309
  pthread_mutex_t       mutex;           /* To sync on reads into buffer. */
328
323
  my_bool alloced;
329
324
#endif
330
325
} IO_CACHE_SHARE;
331
 
#endif
332
326
 
333
327
typedef struct st_io_cache              /* Used when cacheing files */
334
328
{
369
363
    WRITE_CACHE, and &read_pos and &read_end respectively otherwise
370
364
  */
371
365
  uchar  **current_pos, **current_end;
372
 
#ifdef THREAD
373
366
  /*
374
367
    The lock is for append buffer used in SEQ_READ_APPEND cache
375
368
    need mutex copying from append buffer to read buffer.
383
376
    READ_CACHE mode is supported.
384
377
  */
385
378
  IO_CACHE_SHARE *share;
386
 
#endif
387
379
  /*
388
380
    A caller will use my_b_read() macro to read from the cache
389
381
    if the data is already in cache, it will be simply copied with
604
596
extern int my_copystat(const char *from, const char *to, int MyFlags);
605
597
extern char * my_filename(File fd);
606
598
 
607
 
#ifndef THREAD
608
 
extern void dont_break(void);
609
 
extern void allow_break(void);
610
 
#else
611
599
#define dont_break()
612
600
#define allow_break()
613
 
#endif
614
601
 
615
602
#ifdef EXTRA_DEBUG
616
603
void my_print_open_files(void);
689
676
                               pbool clear_cache);
690
677
extern void setup_io_cache(IO_CACHE* info);
691
678
extern int _my_b_read(IO_CACHE *info,uchar *Buffer,size_t Count);
692
 
#ifdef THREAD
693
679
extern int _my_b_read_r(IO_CACHE *info,uchar *Buffer,size_t Count);
694
680
extern void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
695
681
                                IO_CACHE *write_cache, uint num_threads);
696
682
extern void remove_io_thread(IO_CACHE *info);
697
 
#endif
698
683
extern int _my_b_seq_read(IO_CACHE *info,uchar *Buffer,size_t Count);
699
684
extern int _my_b_net_read(IO_CACHE *info,uchar *Buffer,size_t Count);
700
685
extern int _my_b_get(IO_CACHE *info);