Coverage Report

Created: 2026-07-16 06:51

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/opensips/fastlock.h
Line
Count
Source
1
/*
2
 * Copyright (C) 2001-2003 FhG Fokus
3
 *
4
 * This file is part of opensips, a free SIP server.
5
 *
6
 * opensips is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 2 of the License, or
9
 * (at your option) any later version
10
 *
11
 * opensips is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
19
 *
20
 * History:
21
 * --------
22
 *  2002-02-05  created by andrei
23
 *  2003-01-16  added PPC locking code contributed by Dinos Dorkofikis
24
 *               <kdor@intranet.gr>
25
 *  2004-09-12  added MIPS locking for ISA>=2 (>r3000)  (andrei)
26
 *  2004-12-16  for now use the same locking code for sparc32 as for sparc64
27
 *               (it will work only if NOSMP is defined) (andrei)
28
 *
29
 *  2005-04-27  added alpha locking code (andrei)
30
 *  2005-05-25  PPC locking code enabled for PPC64; added a lwsync to
31
 *               the tsl part and replaced the sync with a lwsync for the
32
 *               unlock part (andrei)
33
 *  2016-12-07  Add support for armv6 (razvanc)
34
 *  2016-12-07  Add support for armv7 - not tested (razvanc)
35
 */
36
37
/*!
38
 * \file
39
 * \brief Assembler routines for fast architecture dependend locking.
40
 *
41
 * Contains the assembler routines for the fast architecture dependend
42
 * locking primitives used by the server. This routines are needed e.g.
43
 * to protect shared data structures that are accessed from muliple processes.
44
 * \todo replace this with the assembler routines provided by the linux kernel
45
 */
46
47
48
#ifndef fastlock_h
49
#define fastlock_h
50
51
#include <sched.h>
52
53
54
#define SPIN_OPTIMIZE /* if defined optimize spining on the lock:
55
                         try first the lock with non-atomic/non memory locking
56
                         operations, and only if the lock appears to be free
57
                         switch to the more expensive version */
58
59
/*! The actual lock */
60
#ifndef DBG_LOCK
61
typedef  volatile int fl_lock_t;
62
#else
63
typedef struct fl_lock_t_{
64
  volatile int lock;
65
  char* file;
66
  char* func;
67
  unsigned long line;
68
} fl_lock_t;
69
#endif
70
71
/*! Initialize a lock, zero is unlocked. */
72
#ifndef DBG_LOCK
73
0
  #define init_lock( l ) (l)=0
74
#else 
75
  #define init_lock( l ) (l).lock = 0
76
#endif
77
78
79
80
/*! \brief
81
 * Test and set a lock. Used by the get_lock function.
82
 * \param lock the lock that should be set
83
 * \return 1 if the lock is held by someone else, 0 otherwise
84
 * \see get_lock
85
 */
86
#ifndef DBG_LOCK
87
inline static int tsl(fl_lock_t* lock)
88
#else
89
inline static int tsl(volatile int* lock)
90
#endif
91
0
{
92
0
  int val;
93
94
0
#if defined(__CPU_i386) || defined(__CPU_x86_64)
95
96
#ifdef NOSMP
97
  asm volatile(
98
    " xor %0, %0 \n\t"
99
    " btsl $0, %2 \n\t"
100
    " setc %b0 \n\t"
101
    : "=&q" (val), "=m" (*lock) : "m"(*lock) : "memory", "cc"
102
  );
103
#else
104
0
  asm volatile(
105
0
#ifdef SPIN_OPTIMIZE
106
0
    " cmpb $0, %2 \n\t"
107
0
    " mov $1, %0 \n\t"
108
0
    " jnz 1f \n\t"
109
#else
110
    " mov $1, %0 \n\t"
111
#endif
112
0
    " xchgb %2, %b0 \n\t"
113
0
    "1: \n\t"
114
0
    : "=&q" (val), "=m" (*lock) : "m"(*lock) : "memory"
115
0
#ifdef SPIN_OPTIMIZE
116
0
      , "cc"
117
0
#endif
118
0
  );
119
0
#endif /*NOSMP*/
120
#elif defined(__CPU_sparc64) || defined(__CPU_sparc)
121
  asm volatile(
122
      "ldstub [%1], %0 \n\t"
123
#ifndef NOSMP
124
      "membar #StoreStore | #StoreLoad \n\t"
125
#endif
126
      : "=&r"(val) : "r"(lock):"memory"
127
  );
128
129
#elif defined __CPU_arm
130
  asm volatile(
131
      "swp %0, %2, [%3] \n\t"
132
      : "=&r" (val), "=m"(*lock) : "r"(1), "r" (lock) : "memory"
133
  );
134
135
#elif defined(__CPU_arm6) || defined(__CPU_arm7)
136
  asm volatile(
137
      "ldrex   %0, [%2] \n\t"
138
      "cmp     %0, #0 \n\t"
139
      "it      eq \n\t"
140
      "strexeq %0, %1, [%2] \n\t"
141
#ifndef NOSMP
142
#if defined(__CPU_arm7)
143
      "dmb \n\t"
144
#else
145
      "mcr p15, #0, r1, c7, c10, #5\n\t"
146
#endif
147
#endif
148
      : "=&r" (val) : "r"(1), "r" (lock) : "cc", "memory"
149
  );
150
#elif defined(__CPU_aarch64)
151
#ifdef SPIN_OPTIMIZE
152
  if (__atomic_load_n(lock, __ATOMIC_RELAXED))
153
    return 1;
154
#endif
155
  val = __atomic_exchange_n(lock, 1, __ATOMIC_ACQUIRE);
156
#elif defined(__CPU_ppc) || defined(__CPU_ppc64)
157
  asm volatile(
158
      "1: lwarx  %0, 0, %2\n\t"
159
      "   cmpwi  %0, 0\n\t"
160
      "   bne    0f\n\t"
161
      "   stwcx. %1, 0, %2\n\t"
162
      "   bne-   1b\n\t"
163
      "   lwsync\n\t" /* lwsync or isync, lwsync is faster
164
                 and should work, see
165
                 [ IBM Programming environments Manual, D.4.1.1]
166
               */
167
      "0:\n\t"
168
      : "=&r" (val) : "r"(1), "b" (lock) : "memory", "cc"
169
        );
170
#elif defined(__CPU_mips2) || defined(__CPU_mips32) || defined(__CPU_mips64)
171
  long tmp;
172
  
173
  asm volatile(
174
    ".set push \n\t"
175
    ".set noreorder\n\t"
176
    ".set mips2 \n\t"
177
    "1:  ll %1, %2   \n\t"
178
    "    li %0, 1 \n\t"
179
    "    sc %0, %2  \n\t"
180
    "    beqz %0, 1b \n\t"
181
    "    nop \n\t"
182
#ifndef NOSMP
183
    "    sync \n\t"
184
#endif
185
    ".set pop\n\t"
186
    : "=&r" (tmp), "=&r" (val), "=m" (*lock)
187
    : "m" (*lock)
188
    : "memory"
189
  );
190
#elif defined __CPU_alpha
191
  long tmp;
192
  tmp=0;
193
  /* lock low bit set to 1 when the lock is hold and to 0 otherwise */
194
  asm volatile(
195
    "1:  ldl %0, %1   \n\t"
196
    "    blbs %0, 2f  \n\t"  /* optimization if locked */
197
    "    ldl_l %0, %1 \n\t"
198
    "    blbs %0, 2f  \n\t"
199
    "    lda %2, 1    \n\t"  /* or: or $31, 1, %2 ??? */
200
    "    stl_c %2, %1 \n\t"
201
    "    beq %2, 1b   \n\t"
202
    "    mb           \n\t"
203
    "2:               \n\t"
204
    :"=&r" (val), "=m"(*lock), "=&r"(tmp)
205
    :"m"(*lock)
206
    : "memory"
207
  );
208
#else
209
#error "unknown architecture"
210
#endif
211
0
  return val;
212
0
}
Unexecuted instantiation: msg_parser.c:tsl
Unexecuted instantiation: parse_uri.c:tsl
Unexecuted instantiation: parse_fline.c:tsl
Unexecuted instantiation: parse_hname2.c:tsl
Unexecuted instantiation: parse_content.c:tsl
Unexecuted instantiation: hf.c:tsl
Unexecuted instantiation: parse_to.c:tsl
Unexecuted instantiation: parse_via.c:tsl
Unexecuted instantiation: dprint.c:tsl
Unexecuted instantiation: pt.c:tsl
Unexecuted instantiation: strcommon.c:tsl
Unexecuted instantiation: ut.c:tsl
Unexecuted instantiation: sdp_ops.c:tsl
Unexecuted instantiation: statistics.c:tsl
Unexecuted instantiation: pvar.c:tsl
Unexecuted instantiation: route.c:tsl
Unexecuted instantiation: socket_info.c:tsl
Unexecuted instantiation: ipc.c:tsl
Unexecuted instantiation: core_stats.c:tsl
Unexecuted instantiation: route_struct.c:tsl
Unexecuted instantiation: dset.c:tsl
Unexecuted instantiation: pt_scaling.c:tsl
Unexecuted instantiation: pt_load.c:tsl
Unexecuted instantiation: sr_module.c:tsl
Unexecuted instantiation: action.c:tsl
Unexecuted instantiation: flags.c:tsl
Unexecuted instantiation: db_insertq.c:tsl
Unexecuted instantiation: db.c:tsl
Unexecuted instantiation: proto_tcp.c:tsl
Unexecuted instantiation: proto_udp.c:tsl
Unexecuted instantiation: trans.c:tsl
Unexecuted instantiation: net_tcp_proc.c:tsl
Unexecuted instantiation: proxy_protocol.c:tsl
Unexecuted instantiation: net_tcp.c:tsl
Unexecuted instantiation: tcp_common.c:tsl
Unexecuted instantiation: net_udp.c:tsl
Unexecuted instantiation: tcp_conn_profile.c:tsl
Unexecuted instantiation: trans_trace.c:tsl
Unexecuted instantiation: net_tcp_report.c:tsl
Unexecuted instantiation: shm_mem.c:tsl
Unexecuted instantiation: f_parallel_malloc.c:tsl
Unexecuted instantiation: common.c:tsl
Unexecuted instantiation: q_malloc.c:tsl
Unexecuted instantiation: rpm_mem.c:tsl
Unexecuted instantiation: mi.c:tsl
Unexecuted instantiation: item.c:tsl
Unexecuted instantiation: sdp.c:tsl
Unexecuted instantiation: sdp_helpr_funcs.c:tsl
Unexecuted instantiation: digest_parser.c:tsl
Unexecuted instantiation: param_parser.c:tsl
Unexecuted instantiation: parse_contact.c:tsl
Unexecuted instantiation: parse_body.c:tsl
Unexecuted instantiation: parse_security.c:tsl
Unexecuted instantiation: parse_call_info.c:tsl
Unexecuted instantiation: parse_event.c:tsl
Unexecuted instantiation: parse_disposition.c:tsl
Unexecuted instantiation: parse_authenticate.c:tsl
Unexecuted instantiation: parser_f.c:tsl
Unexecuted instantiation: parse_rpid.c:tsl
Unexecuted instantiation: parse_ppi.c:tsl
Unexecuted instantiation: parse_fcaps.c:tsl
Unexecuted instantiation: parse_rr.c:tsl
Unexecuted instantiation: parse_param.c:tsl
Unexecuted instantiation: parse_diversion.c:tsl
Unexecuted instantiation: parse_nameaddr.c:tsl
Unexecuted instantiation: parse_expires.c:tsl
Unexecuted instantiation: parse_refer_to.c:tsl
Unexecuted instantiation: parse_from.c:tsl
Unexecuted instantiation: parse_pai.c:tsl
Unexecuted instantiation: event_interface.c:tsl
Unexecuted instantiation: evi_params.c:tsl
Unexecuted instantiation: receive.c:tsl
Unexecuted instantiation: ip_addr.c:tsl
Unexecuted instantiation: async.c:tsl
Unexecuted instantiation: daemonize.c:tsl
Unexecuted instantiation: timer.c:tsl
Unexecuted instantiation: trace_api.c:tsl
Unexecuted instantiation: mod_fix.c:tsl
Unexecuted instantiation: reactor.c:tsl
Unexecuted instantiation: forward.c:tsl
Unexecuted instantiation: xlog.c:tsl
Unexecuted instantiation: blacklists.c:tsl
Unexecuted instantiation: usr_avp.c:tsl
Unexecuted instantiation: profiling.c:tsl
Unexecuted instantiation: resolve.c:tsl
Unexecuted instantiation: io_wait.c:tsl
Unexecuted instantiation: transformations.c:tsl
Unexecuted instantiation: sr_module_deps.c:tsl
Unexecuted instantiation: cfg_reload.c:tsl
Unexecuted instantiation: time_rec.c:tsl
Unexecuted instantiation: map.c:tsl
Unexecuted instantiation: status_report.c:tsl
Unexecuted instantiation: signals.c:tsl
Unexecuted instantiation: db_id.c:tsl
Unexecuted instantiation: csv.c:tsl
Unexecuted instantiation: cJSON.c:tsl
Unexecuted instantiation: evi_transport.c:tsl
Unexecuted instantiation: msg_translator.c:tsl
Unexecuted instantiation: md5utils.c:tsl
Unexecuted instantiation: cfg.tab.c:tsl
Unexecuted instantiation: modparam.c:tsl
Unexecuted instantiation: crc.c:tsl
Unexecuted instantiation: re.c:tsl
Unexecuted instantiation: lex.yy.c:tsl
Unexecuted instantiation: cfg_pp.c:tsl
Unexecuted instantiation: proxy.c:tsl
Unexecuted instantiation: shutdown.c:tsl
Unexecuted instantiation: core_cmds.c:tsl
Unexecuted instantiation: cachedb.c:tsl
Unexecuted instantiation: cachedb_id.c:tsl
213
214
215
/*! \brief
216
 * Set a lock.
217
 * \param lock the lock that should be set
218
 * \see tsl
219
 */
220
#ifndef DBG_LOCK
221
inline static void get_lock(fl_lock_t* lock)
222
0
{
223
#else
224
inline static void get_lock(fl_lock_t* lock_struct,  const char* file, const char* func, unsigned int line)
225
{
226
  volatile int *lock = &lock_struct->lock;
227
#endif
228
229
0
#ifdef ADAPTIVE_WAIT
230
0
  int i=ADAPTIVE_WAIT_LOOPS;
231
0
#endif
232
233
0
  while(tsl(lock)){
234
#ifdef BUSY_WAIT
235
#elif defined ADAPTIVE_WAIT
236
0
    if (i>0) i--;
237
0
    else sched_yield();
238
#else
239
    sched_yield();
240
#endif
241
0
  }
242
243
#ifdef DBG_LOCK
244
  lock_struct->file = (char*)file;
245
  lock_struct->func = (char*)func;
246
  lock_struct->line = line;
247
#endif
248
249
0
}
Unexecuted instantiation: msg_parser.c:get_lock
Unexecuted instantiation: parse_uri.c:get_lock
Unexecuted instantiation: parse_fline.c:get_lock
Unexecuted instantiation: parse_hname2.c:get_lock
Unexecuted instantiation: parse_content.c:get_lock
Unexecuted instantiation: hf.c:get_lock
Unexecuted instantiation: parse_to.c:get_lock
Unexecuted instantiation: parse_via.c:get_lock
Unexecuted instantiation: dprint.c:get_lock
Unexecuted instantiation: pt.c:get_lock
Unexecuted instantiation: strcommon.c:get_lock
Unexecuted instantiation: ut.c:get_lock
Unexecuted instantiation: sdp_ops.c:get_lock
Unexecuted instantiation: statistics.c:get_lock
Unexecuted instantiation: pvar.c:get_lock
Unexecuted instantiation: route.c:get_lock
Unexecuted instantiation: socket_info.c:get_lock
Unexecuted instantiation: ipc.c:get_lock
Unexecuted instantiation: core_stats.c:get_lock
Unexecuted instantiation: route_struct.c:get_lock
Unexecuted instantiation: dset.c:get_lock
Unexecuted instantiation: pt_scaling.c:get_lock
Unexecuted instantiation: pt_load.c:get_lock
Unexecuted instantiation: sr_module.c:get_lock
Unexecuted instantiation: action.c:get_lock
Unexecuted instantiation: flags.c:get_lock
Unexecuted instantiation: db_insertq.c:get_lock
Unexecuted instantiation: db.c:get_lock
Unexecuted instantiation: proto_tcp.c:get_lock
Unexecuted instantiation: proto_udp.c:get_lock
Unexecuted instantiation: trans.c:get_lock
Unexecuted instantiation: net_tcp_proc.c:get_lock
Unexecuted instantiation: proxy_protocol.c:get_lock
Unexecuted instantiation: net_tcp.c:get_lock
Unexecuted instantiation: tcp_common.c:get_lock
Unexecuted instantiation: net_udp.c:get_lock
Unexecuted instantiation: tcp_conn_profile.c:get_lock
Unexecuted instantiation: trans_trace.c:get_lock
Unexecuted instantiation: net_tcp_report.c:get_lock
Unexecuted instantiation: shm_mem.c:get_lock
Unexecuted instantiation: f_parallel_malloc.c:get_lock
Unexecuted instantiation: common.c:get_lock
Unexecuted instantiation: q_malloc.c:get_lock
Unexecuted instantiation: rpm_mem.c:get_lock
Unexecuted instantiation: mi.c:get_lock
Unexecuted instantiation: item.c:get_lock
Unexecuted instantiation: sdp.c:get_lock
Unexecuted instantiation: sdp_helpr_funcs.c:get_lock
Unexecuted instantiation: digest_parser.c:get_lock
Unexecuted instantiation: param_parser.c:get_lock
Unexecuted instantiation: parse_contact.c:get_lock
Unexecuted instantiation: parse_body.c:get_lock
Unexecuted instantiation: parse_security.c:get_lock
Unexecuted instantiation: parse_call_info.c:get_lock
Unexecuted instantiation: parse_event.c:get_lock
Unexecuted instantiation: parse_disposition.c:get_lock
Unexecuted instantiation: parse_authenticate.c:get_lock
Unexecuted instantiation: parser_f.c:get_lock
Unexecuted instantiation: parse_rpid.c:get_lock
Unexecuted instantiation: parse_ppi.c:get_lock
Unexecuted instantiation: parse_fcaps.c:get_lock
Unexecuted instantiation: parse_rr.c:get_lock
Unexecuted instantiation: parse_param.c:get_lock
Unexecuted instantiation: parse_diversion.c:get_lock
Unexecuted instantiation: parse_nameaddr.c:get_lock
Unexecuted instantiation: parse_expires.c:get_lock
Unexecuted instantiation: parse_refer_to.c:get_lock
Unexecuted instantiation: parse_from.c:get_lock
Unexecuted instantiation: parse_pai.c:get_lock
Unexecuted instantiation: event_interface.c:get_lock
Unexecuted instantiation: evi_params.c:get_lock
Unexecuted instantiation: receive.c:get_lock
Unexecuted instantiation: ip_addr.c:get_lock
Unexecuted instantiation: async.c:get_lock
Unexecuted instantiation: daemonize.c:get_lock
Unexecuted instantiation: timer.c:get_lock
Unexecuted instantiation: trace_api.c:get_lock
Unexecuted instantiation: mod_fix.c:get_lock
Unexecuted instantiation: reactor.c:get_lock
Unexecuted instantiation: forward.c:get_lock
Unexecuted instantiation: xlog.c:get_lock
Unexecuted instantiation: blacklists.c:get_lock
Unexecuted instantiation: usr_avp.c:get_lock
Unexecuted instantiation: profiling.c:get_lock
Unexecuted instantiation: resolve.c:get_lock
Unexecuted instantiation: io_wait.c:get_lock
Unexecuted instantiation: transformations.c:get_lock
Unexecuted instantiation: sr_module_deps.c:get_lock
Unexecuted instantiation: cfg_reload.c:get_lock
Unexecuted instantiation: time_rec.c:get_lock
Unexecuted instantiation: map.c:get_lock
Unexecuted instantiation: status_report.c:get_lock
Unexecuted instantiation: signals.c:get_lock
Unexecuted instantiation: db_id.c:get_lock
Unexecuted instantiation: csv.c:get_lock
Unexecuted instantiation: cJSON.c:get_lock
Unexecuted instantiation: evi_transport.c:get_lock
Unexecuted instantiation: msg_translator.c:get_lock
Unexecuted instantiation: md5utils.c:get_lock
Unexecuted instantiation: cfg.tab.c:get_lock
Unexecuted instantiation: modparam.c:get_lock
Unexecuted instantiation: crc.c:get_lock
Unexecuted instantiation: re.c:get_lock
Unexecuted instantiation: lex.yy.c:get_lock
Unexecuted instantiation: cfg_pp.c:get_lock
Unexecuted instantiation: proxy.c:get_lock
Unexecuted instantiation: shutdown.c:get_lock
Unexecuted instantiation: core_cmds.c:get_lock
Unexecuted instantiation: cachedb.c:get_lock
Unexecuted instantiation: cachedb_id.c:get_lock
250
251
252
/*! \brief
253
 * Release a lock
254
 * \param lock the lock that should be released
255
 */
256
#ifndef DBG_LOCK
257
inline static void release_lock(fl_lock_t* lock)
258
0
{
259
#else 
260
inline static void release_lock(fl_lock_t* lock_struct)
261
{
262
  volatile int *lock = &lock_struct->lock;
263
  lock_struct->file = 0;
264
  lock_struct->func = 0;
265
  lock_struct->line = 0;
266
#endif
267
268
#if defined(__CPU_i386) 
269
#ifdef NOSMP
270
  asm volatile(
271
    " movb $0, %0 \n\t" 
272
    : "=m"(*lock) : : "memory"
273
  ); 
274
#else /* ! NOSMP */
275
  int val;
276
  /* a simple mov $0, (lock) does not force StoreStore ordering on all
277
     x86 versions and it doesn't seem to force LoadStore either */
278
  asm volatile(
279
    " xchgb %b0, %1 \n\t"
280
    : "=q" (val), "=m" (*lock) : "0" (0) : "memory"
281
  );
282
#endif /* NOSMP */
283
#elif defined(__CPU_x86_64)
284
  asm volatile(
285
0
    " movb $0, %0 \n\t" /* on amd64 membar StoreStore | LoadStore is 
286
                 implicit (at least on the same mem. type) */
287
0
    : "=m"(*lock) : : "memory"
288
0
  );
289
#elif defined(__CPU_sparc64) || defined(__CPU_sparc)
290
  asm volatile(
291
  #ifndef NOSMP
292
        "membar #LoadStore | #StoreStore \n\t" /*is this really needed?*/
293
  #endif
294
      "stb %%g0, [%1] \n\t"
295
      : "=m"(*lock) : "r" (lock) : "memory"
296
  );
297
#elif defined(__CPU_arm) || defined(__CPU_arm6) || defined(__CPU_arm7)
298
  asm volatile(
299
#ifndef NOSMP
300
#if defined(__CPU_arm7)
301
    "dmb \n\t"
302
#else
303
    "mcr p15, #0, r1, c7, c10, #5\n\t"
304
#endif
305
#endif
306
    " str %1, [%2] \n\r"
307
    : "=m"(*lock) : "r"(0), "r"(lock) : "memory"
308
  );
309
#elif defined(__CPU_aarch64)
310
  __atomic_store_n(lock, 0, __ATOMIC_RELEASE);
311
#elif defined(__CPU_ppc) || defined(__CPU_ppc64)
312
  asm volatile(
313
      /* "sync\n\t"  lwsync is faster and will work
314
       *             here too
315
       *             [IBM Programming Environments Manual, D.4.2.2]
316
       */
317
      "lwsync\n\t"
318
      "stwx %1, 0, %2\n\t"
319
      : "=m"(*lock) : "r"(0), "r"(lock) : "memory"
320
    );
321
  *lock = 0;
322
#elif defined(__CPU_mips2) || defined(__CPU_mips32) || defined(__CPU_mips64)
323
  asm volatile(
324
    ".set push \n\t"
325
    ".set noreorder \n\t"
326
    ".set mips2 \n\t"
327
#ifndef NOSMP
328
    "    sync \n\t"
329
#endif
330
    "    sw $0, %0 \n\t"
331
    ".set pop \n\t"
332
    : "=m" (*lock)  : /* no input */ : "memory"
333
  );
334
#elif defined __CPU_alpha
335
  asm volatile(
336
#ifndef  NOSMP
337
    "    mb          \n\t"
338
#endif
339
    "    stl $31, %0 \n\t"
340
    : "=m"(*lock) :/* no input*/ : "memory"  /* because of the mb */
341
  );
342
#else
343
#error "unknown architecture"
344
#endif
345
346
0
}
Unexecuted instantiation: msg_parser.c:release_lock
Unexecuted instantiation: parse_uri.c:release_lock
Unexecuted instantiation: parse_fline.c:release_lock
Unexecuted instantiation: parse_hname2.c:release_lock
Unexecuted instantiation: parse_content.c:release_lock
Unexecuted instantiation: hf.c:release_lock
Unexecuted instantiation: parse_to.c:release_lock
Unexecuted instantiation: parse_via.c:release_lock
Unexecuted instantiation: dprint.c:release_lock
Unexecuted instantiation: pt.c:release_lock
Unexecuted instantiation: strcommon.c:release_lock
Unexecuted instantiation: ut.c:release_lock
Unexecuted instantiation: sdp_ops.c:release_lock
Unexecuted instantiation: statistics.c:release_lock
Unexecuted instantiation: pvar.c:release_lock
Unexecuted instantiation: route.c:release_lock
Unexecuted instantiation: socket_info.c:release_lock
Unexecuted instantiation: ipc.c:release_lock
Unexecuted instantiation: core_stats.c:release_lock
Unexecuted instantiation: route_struct.c:release_lock
Unexecuted instantiation: dset.c:release_lock
Unexecuted instantiation: pt_scaling.c:release_lock
Unexecuted instantiation: pt_load.c:release_lock
Unexecuted instantiation: sr_module.c:release_lock
Unexecuted instantiation: action.c:release_lock
Unexecuted instantiation: flags.c:release_lock
Unexecuted instantiation: db_insertq.c:release_lock
Unexecuted instantiation: db.c:release_lock
Unexecuted instantiation: proto_tcp.c:release_lock
Unexecuted instantiation: proto_udp.c:release_lock
Unexecuted instantiation: trans.c:release_lock
Unexecuted instantiation: net_tcp_proc.c:release_lock
Unexecuted instantiation: proxy_protocol.c:release_lock
Unexecuted instantiation: net_tcp.c:release_lock
Unexecuted instantiation: tcp_common.c:release_lock
Unexecuted instantiation: net_udp.c:release_lock
Unexecuted instantiation: tcp_conn_profile.c:release_lock
Unexecuted instantiation: trans_trace.c:release_lock
Unexecuted instantiation: net_tcp_report.c:release_lock
Unexecuted instantiation: shm_mem.c:release_lock
Unexecuted instantiation: f_parallel_malloc.c:release_lock
Unexecuted instantiation: common.c:release_lock
Unexecuted instantiation: q_malloc.c:release_lock
Unexecuted instantiation: rpm_mem.c:release_lock
Unexecuted instantiation: mi.c:release_lock
Unexecuted instantiation: item.c:release_lock
Unexecuted instantiation: sdp.c:release_lock
Unexecuted instantiation: sdp_helpr_funcs.c:release_lock
Unexecuted instantiation: digest_parser.c:release_lock
Unexecuted instantiation: param_parser.c:release_lock
Unexecuted instantiation: parse_contact.c:release_lock
Unexecuted instantiation: parse_body.c:release_lock
Unexecuted instantiation: parse_security.c:release_lock
Unexecuted instantiation: parse_call_info.c:release_lock
Unexecuted instantiation: parse_event.c:release_lock
Unexecuted instantiation: parse_disposition.c:release_lock
Unexecuted instantiation: parse_authenticate.c:release_lock
Unexecuted instantiation: parser_f.c:release_lock
Unexecuted instantiation: parse_rpid.c:release_lock
Unexecuted instantiation: parse_ppi.c:release_lock
Unexecuted instantiation: parse_fcaps.c:release_lock
Unexecuted instantiation: parse_rr.c:release_lock
Unexecuted instantiation: parse_param.c:release_lock
Unexecuted instantiation: parse_diversion.c:release_lock
Unexecuted instantiation: parse_nameaddr.c:release_lock
Unexecuted instantiation: parse_expires.c:release_lock
Unexecuted instantiation: parse_refer_to.c:release_lock
Unexecuted instantiation: parse_from.c:release_lock
Unexecuted instantiation: parse_pai.c:release_lock
Unexecuted instantiation: event_interface.c:release_lock
Unexecuted instantiation: evi_params.c:release_lock
Unexecuted instantiation: receive.c:release_lock
Unexecuted instantiation: ip_addr.c:release_lock
Unexecuted instantiation: async.c:release_lock
Unexecuted instantiation: daemonize.c:release_lock
Unexecuted instantiation: timer.c:release_lock
Unexecuted instantiation: trace_api.c:release_lock
Unexecuted instantiation: mod_fix.c:release_lock
Unexecuted instantiation: reactor.c:release_lock
Unexecuted instantiation: forward.c:release_lock
Unexecuted instantiation: xlog.c:release_lock
Unexecuted instantiation: blacklists.c:release_lock
Unexecuted instantiation: usr_avp.c:release_lock
Unexecuted instantiation: profiling.c:release_lock
Unexecuted instantiation: resolve.c:release_lock
Unexecuted instantiation: io_wait.c:release_lock
Unexecuted instantiation: transformations.c:release_lock
Unexecuted instantiation: sr_module_deps.c:release_lock
Unexecuted instantiation: cfg_reload.c:release_lock
Unexecuted instantiation: time_rec.c:release_lock
Unexecuted instantiation: map.c:release_lock
Unexecuted instantiation: status_report.c:release_lock
Unexecuted instantiation: signals.c:release_lock
Unexecuted instantiation: db_id.c:release_lock
Unexecuted instantiation: csv.c:release_lock
Unexecuted instantiation: cJSON.c:release_lock
Unexecuted instantiation: evi_transport.c:release_lock
Unexecuted instantiation: msg_translator.c:release_lock
Unexecuted instantiation: md5utils.c:release_lock
Unexecuted instantiation: cfg.tab.c:release_lock
Unexecuted instantiation: modparam.c:release_lock
Unexecuted instantiation: crc.c:release_lock
Unexecuted instantiation: re.c:release_lock
Unexecuted instantiation: lex.yy.c:release_lock
Unexecuted instantiation: cfg_pp.c:release_lock
Unexecuted instantiation: proxy.c:release_lock
Unexecuted instantiation: shutdown.c:release_lock
Unexecuted instantiation: core_cmds.c:release_lock
Unexecuted instantiation: cachedb.c:release_lock
Unexecuted instantiation: cachedb_id.c:release_lock
347
348
349
#endif