]>
Commit | Line | Data |
---|---|---|
39158de0 | 1 | Index: db2/db_int.h |
2 | =================================================================== | |
3 | RCS file: /glibc/cvsfiles/libc/db2/db_int.h,v | |
4 | retrieving revision 1.10 | |
5 | diff -u -r1.10 db_int.h | |
6 | --- glibc-2.1.2/db2/db_int.h 1999/06/16 14:27:59 1.10 | |
7 | +++ glibc-2.1.2/db2/db_int.h 1999/08/30 21:26:15 | |
8 | @@ -138,7 +138,7 @@ | |
9 | /******************************************************* | |
10 | * Mutex support. | |
11 | *******************************************************/ | |
12 | -typedef unsigned char tsl_t; | |
13 | +typedef u_int32_t tsl_t; | |
14 | ||
15 | /* | |
16 | * !!! | |
17 | Index: db2/mutex/mutex.c | |
18 | =================================================================== | |
19 | RCS file: /glibc/cvsfiles/libc/db2/mutex/mutex.c,v | |
20 | retrieving revision 1.7 | |
21 | diff -u -r1.7 mutex.c | |
22 | --- glibc-2.1.2/db2/mutex/mutex.c 1999/06/13 11:24:41 1.7 | |
23 | +++ glibc-2.1.2/db2/mutex/mutex.c 1999/08/30 21:26:16 | |
24 | @@ -110,6 +110,10 @@ | |
25 | #include "x86.gcc" | |
26 | #endif | |
27 | ||
28 | +#ifdef HAVE_ASSEM_ALPHA | |
29 | +#include "alpha.h" | |
30 | +#endif | |
31 | + | |
32 | #ifdef WIN16 | |
33 | /* Win16 spinlocks are simple because we cannot possibly be preempted. */ | |
34 | #define TSL_INIT(tsl) | |
35 | Index: db2/mutex/alpha.h | |
36 | =================================================================== | |
37 | --- /dev/null Tue May 5 13:32:27 1998 | |
38 | +++ glibc-2.1.2/db2/mutex/alpha.h Mon Aug 30 14:21:09 1999 | |
39 | @@ -0,0 +1,26 @@ | |
40 | +/* For alpha, 0 is clear, 1 is set. */ | |
41 | + | |
42 | +#ifdef __GNUC__ | |
43 | +#define TSL_SET(tsl) ({ \ | |
44 | + register tsl_t *__l = (tsl); \ | |
45 | + int __r; \ | |
46 | + asm volatile( \ | |
47 | + "1: ldl_l %0,%1\n" \ | |
48 | + " blbs %0,2f\n" \ | |
49 | + " mov 1,%0\n" \ | |
50 | + " stl_c %0,%1\n" \ | |
51 | + " bne %0,1b\n" \ | |
52 | + " mb\n" \ | |
53 | + "2:" \ | |
54 | + : "=&r"(__r), "=m"(*__l) : "m"(*__l) : "memory"); \ | |
55 | + __r; \ | |
56 | +}) | |
57 | +#endif | |
58 | + | |
59 | +#ifdef __DECC | |
60 | +#include <alpha/builtins.h> | |
61 | +#define TSL_SET(tsl) (__LOCK_LONG_RETRY((tsl), 1) != 0) | |
62 | +#endif | |
63 | + | |
64 | +#define TSL_UNSET(tsl) (*(tsl) = 0) | |
65 | +#define TSL_INIT(tsl) TSL_UNSET(tsl) | |
66 | Index: sysdeps/alpha/Makefile | |
67 | =================================================================== | |
68 | RCS file: /glibc/cvsfiles/libc/sysdeps/alpha/Makefile,v | |
69 | retrieving revision 1.15 | |
70 | diff -u -r1.15 Makefile | |
71 | --- glibc-2.1.2/sysdeps/alpha/Makefile 1998/06/27 09:50:41 1.15 | |
72 | +++ glibc-2.1.2/sysdeps/alpha/Makefile 1999/08/30 21:34:00 | |
73 | @@ -1,4 +1,4 @@ | |
74 | -# Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. | |
75 | +# Copyright (C) 1993, 94, 95, 96, 97, 99 Free Software Foundation, Inc. | |
76 | # This file is part of the GNU C Library. | |
77 | # Contributed by Brendan Kehoe (brendan@zen.org). | |
78 | ||
79 | @@ -16,6 +16,10 @@ | |
80 | # License along with the GNU C Library; see the file COPYING.LIB. If not, | |
81 | # write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
82 | # Boston, MA 02111-1307, USA. | |
83 | + | |
84 | +ifeq ($(subdir),db2) | |
85 | +CPPFLAGS += -DHAVE_SPINLOCKS=1 -DHAVE_ASSEM_ALPHA=1 | |
86 | +endif | |
87 | ||
88 | ifeq ($(subdir),gmon) | |
89 | sysdep_routines += _mcount |