mtdll.h 2.22 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (c) 2002, TransGaming Technologies Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
16
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 18
 */

19 20 21 22 23 24 25 26
#ifndef WINE_MTDLL_H
#define WINE_MTDLL_H

#if defined(_MT)

#define _mlock(locknum)   _lock(locknum)
#define _munlock(locknum) _unlock(locknum)

27 28
void __cdecl _unlock( int locknum );
void __cdecl _lock( int locknum );
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

#else

#define _mlock(locknum)   do {} while(0)
#define _munlock(locknum) do {} while(0)

#endif


#define _SIGNAL_LOCK    1
#define _IOB_SCAN_LOCK  2
#define _TMPNAM_LOCK    3
#define _INPUT_LOCK     4
#define _OUTPUT_LOCK    5
#define _CSCANF_LOCK    6
#define _CPRINTF_LOCK   7
45
#define _CONIO_LOCK     8
46 47 48 49 50
#define _HEAP_LOCK      9
#define _BHEAP_LOCK          10 /* No longer used? */
#define _TIME_LOCK      11
#define _ENV_LOCK       12
#define _EXIT_LOCK1     13
51
#define _EXIT_LOCK2          14
52
#define _THREADDATA_LOCK     15 /* No longer used? */
53
#define _POPEN_LOCK     16
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
#define _LOCKTAB_LOCK   17
#define _OSFHND_LOCK    18
#define _SETLOCALE_LOCK 19
#define _LC_COLLATE_LOCK     20 /* No longer used? */
#define _LC_CTYPE_LOCK       21 /* No longer used? */
#define _LC_MONETARY_LOCK    22 /* No longer used? */
#define _LC_NUMERIC_LOCK     23 /* No longer used? */
#define _LC_TIME_LOCK        24 /* No longer used? */
#define _MB_CP_LOCK     25
#define _NLG_LOCK       26
#define _TYPEINFO_LOCK  27
#define _STREAM_LOCKS   28

/* Must match definition in msvcrt/stdio.h */
#define _IOB_ENTRIES    20

#define _LAST_STREAM_LOCK  (_STREAM_LOCKS+_IOB_ENTRIES-1)

#define _TOTAL_LOCKS        (_LAST_STREAM_LOCK+1)

#endif /* WINE_MTDLL_H */