blob: 547bdfe403096dc8bd99a9b40b0fb6e30a5692f9 [file] [log] [blame]
sewardjaf44c822007-11-25 14:01:38 +00001/*
2 This file is part of drd, a data race detector.
3
sewardj85642922008-01-14 11:54:56 +00004 Copyright (C) 2006-2008 Bart Van Assche
sewardjaf44c822007-11-25 14:01:38 +00005 bart.vanassche@gmail.com
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 02111-1307, USA.
21
22 The GNU General Public License is contained in the file COPYING.
23*/
24
25
bart4bb53d82008-02-28 19:06:34 +000026#include "drd_clientobj.h"
sewardjaf44c822007-11-25 14:01:38 +000027#include "drd_error.h"
28#include "drd_mutex.h"
sewardj721ad7b2007-11-30 08:30:29 +000029#include "priv_drd_clientreq.h"
sewardjaf44c822007-11-25 14:01:38 +000030#include "pub_tool_errormgr.h" // VG_(maybe_record_error)()
31#include "pub_tool_libcassert.h" // tl_assert()
bart4bb53d82008-02-28 19:06:34 +000032#include "pub_tool_libcprint.h" // VG_(message)()
sewardjaf44c822007-11-25 14:01:38 +000033#include "pub_tool_machine.h" // VG_(get_IP)()
34#include "pub_tool_threadstate.h" // VG_(get_running_tid)()
35
36
sewardj347eeba2008-01-21 14:19:07 +000037// Local functions.
38
bart5357fcb2008-02-27 15:46:00 +000039static Bool mutex_is_locked(struct mutex_info* const p);
sewardj347eeba2008-01-21 14:19:07 +000040static void mutex_destroy(struct mutex_info* const p);
41
42
sewardjaf44c822007-11-25 14:01:38 +000043// Local variables.
44
45static Bool s_trace_mutex;
46static ULong s_mutex_lock_count;
sewardjaf44c822007-11-25 14:01:38 +000047
48
49// Function definitions.
50
51void mutex_set_trace(const Bool trace_mutex)
52{
53 tl_assert(!! trace_mutex == trace_mutex);
54 s_trace_mutex = trace_mutex;
55}
56
57static
58void mutex_initialize(struct mutex_info* const p,
59 const Addr mutex,
sewardj721ad7b2007-11-30 08:30:29 +000060 const SizeT size,
61 const MutexT mutex_type)
sewardjaf44c822007-11-25 14:01:38 +000062{
63 tl_assert(mutex != 0);
64 tl_assert(size > 0);
65
bart4bb53d82008-02-28 19:06:34 +000066 tl_assert(p->a1 == mutex);
67 tl_assert(p->a2 == mutex + size);
68 p->cleanup = (void(*)(DrdClientobj*))&mutex_destroy;
sewardj721ad7b2007-11-30 08:30:29 +000069 p->mutex_type = mutex_type;
sewardjaf44c822007-11-25 14:01:38 +000070 p->recursion_count = 0;
71 p->owner = DRD_INVALID_THREADID;
72 vc_init(&p->vc, 0, 0);
73}
74
75static
sewardj721ad7b2007-11-30 08:30:29 +000076struct mutex_info*
77mutex_get_or_allocate(const Addr mutex,
78 const SizeT size,
79 const MutexT mutex_type)
sewardjaf44c822007-11-25 14:01:38 +000080{
bart4bb53d82008-02-28 19:06:34 +000081 struct mutex_info* p;
sewardj721ad7b2007-11-30 08:30:29 +000082
bart4bb53d82008-02-28 19:06:34 +000083 tl_assert(offsetof(DrdClientobj, mutex) == 0);
84 p = &drd_clientobj_get(mutex, ClientMutex)->mutex;
85 if (p)
86 {
87 tl_assert(p->mutex_type == mutex_type);
88 tl_assert(p->a2 - p->a1 == size);
89 return p;
90 }
sewardj721ad7b2007-11-30 08:30:29 +000091
bart4bb53d82008-02-28 19:06:34 +000092 if (drd_clientobj_present(mutex, mutex + size))
sewardj721ad7b2007-11-30 08:30:29 +000093 {
bart4bb53d82008-02-28 19:06:34 +000094 GenericErrInfo GEI;
95 VG_(maybe_record_error)(VG_(get_running_tid)(),
96 GenericErr,
97 VG_(get_IP)(VG_(get_running_tid)()),
98 "Not a mutex",
99 &GEI);
100 return 0;
sewardj721ad7b2007-11-30 08:30:29 +0000101 }
bart4bb53d82008-02-28 19:06:34 +0000102
103 p = &drd_clientobj_add(mutex, mutex + size, ClientMutex)->mutex;
104 mutex_initialize(p, mutex, size, mutex_type);
105 return p;
sewardjaf44c822007-11-25 14:01:38 +0000106}
107
sewardj721ad7b2007-11-30 08:30:29 +0000108struct mutex_info*
109mutex_init(const Addr mutex, const SizeT size, const MutexT mutex_type)
sewardjaf44c822007-11-25 14:01:38 +0000110{
111 struct mutex_info* mutex_p;
112
sewardjaf44c822007-11-25 14:01:38 +0000113 if (s_trace_mutex)
114 {
115 const ThreadId vg_tid = VG_(get_running_tid)();
116 const DrdThreadId drd_tid = VgThreadIdToDrdThreadId(vg_tid);
117 VG_(message)(Vg_DebugMsg,
118 "drd_post_mutex_init tid = %d/%d, %s 0x%lx",
119 vg_tid, drd_tid,
sewardj347eeba2008-01-21 14:19:07 +0000120 mutex_type_name(mutex_type),
sewardjaf44c822007-11-25 14:01:38 +0000121 mutex);
122 }
123
sewardj347eeba2008-01-21 14:19:07 +0000124 mutex_p = mutex_get(mutex);
125 if (mutex_p)
126 {
127 const ThreadId vg_tid = VG_(get_running_tid)();
128 MutexErrInfo MEI
bart4bb53d82008-02-28 19:06:34 +0000129 = { mutex_p->a1, mutex_p->recursion_count, mutex_p->owner };
sewardj347eeba2008-01-21 14:19:07 +0000130 VG_(maybe_record_error)(vg_tid,
131 MutexErr,
132 VG_(get_IP)(vg_tid),
133 "Mutex reinitialization",
134 &MEI);
135 mutex_destroy(mutex_p);
136 }
137 mutex_p = mutex_get_or_allocate(mutex, size, mutex_type);
138
sewardjaf44c822007-11-25 14:01:38 +0000139 return mutex_p;
140}
141
sewardj347eeba2008-01-21 14:19:07 +0000142static void mutex_destroy(struct mutex_info* const p)
sewardjaf44c822007-11-25 14:01:38 +0000143{
144 if (s_trace_mutex)
145 {
146 const ThreadId vg_tid = VG_(get_running_tid)();
147 const DrdThreadId drd_tid = VgThreadIdToDrdThreadId(vg_tid);
148 VG_(message)(Vg_DebugMsg,
149 "drd_pre_mutex_destroy tid = %d/%d, %s 0x%lx",
150 vg_tid, drd_tid,
151 mutex_get_typename(p),
bart4bb53d82008-02-28 19:06:34 +0000152 p->a1);
sewardjaf44c822007-11-25 14:01:38 +0000153 }
154
bart5357fcb2008-02-27 15:46:00 +0000155 if (mutex_is_locked(p))
156 {
bart4bb53d82008-02-28 19:06:34 +0000157 MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
bart5357fcb2008-02-27 15:46:00 +0000158 VG_(maybe_record_error)(VG_(get_running_tid)(),
159 MutexErr,
160 VG_(get_IP)(VG_(get_running_tid)()),
161 "Destroying locked mutex",
162 &MEI);
163 }
164
bart4bb53d82008-02-28 19:06:34 +0000165 drd_clientobj_remove(p->a1);
sewardjaf44c822007-11-25 14:01:38 +0000166}
167
sewardj347eeba2008-01-21 14:19:07 +0000168void mutex_pre_destroy(struct mutex_info* const p)
169{
170 return mutex_destroy(p);
171}
172
173void mutex_post_destroy(const Addr mutex)
174{
175 struct mutex_info* p;
176
177 p = mutex_get(mutex);
178 tl_assert(p);
179 if (p)
180 {
181 if (mutex_get_recursion_count(mutex) > 0)
182 {
183 const ThreadId vg_tid = VG_(get_running_tid)();
bart4bb53d82008-02-28 19:06:34 +0000184 MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
sewardj347eeba2008-01-21 14:19:07 +0000185 VG_(maybe_record_error)(vg_tid,
186 MutexErr,
187 VG_(get_IP)(vg_tid),
188 "Destroying locked mutex",
189 &MEI);
190 }
191 mutex_pre_destroy(p);
192 }
193}
194
sewardjaf44c822007-11-25 14:01:38 +0000195struct mutex_info* mutex_get(const Addr mutex)
196{
bart4bb53d82008-02-28 19:06:34 +0000197 tl_assert(offsetof(DrdClientobj, mutex) == 0);
198 return &drd_clientobj_get(mutex, ClientMutex)->mutex;
sewardjaf44c822007-11-25 14:01:38 +0000199}
200
bart8bba1f72008-02-27 16:13:05 +0000201/** Called before pthread_mutex_lock() is invoked. If a data structure for
202 * the client-side object was not yet created, do this now. Also check whether
203 * an attempt is made to lock recursively a synchronization object that must
204 * not be locked recursively.
205 */
206void mutex_pre_lock(const Addr mutex, const SizeT size, MutexT mutex_type)
207{
bart635cb162008-02-28 08:30:43 +0000208 struct mutex_info* p;
209
210 p = mutex_get(mutex);
bart8bba1f72008-02-27 16:13:05 +0000211 if (p == 0)
212 {
213 mutex_init(mutex, size, mutex_type);
214 p = mutex_get(mutex);
215 }
bart635cb162008-02-28 08:30:43 +0000216
bart8bba1f72008-02-27 16:13:05 +0000217 tl_assert(p);
218
219 if (p->owner == thread_get_running_tid()
220 && p->recursion_count >= 1
221 && mutex_type != mutex_type_recursive_mutex)
222 {
bart4bb53d82008-02-28 19:06:34 +0000223 MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
bart8bba1f72008-02-27 16:13:05 +0000224 VG_(maybe_record_error)(VG_(get_running_tid)(),
225 MutexErr,
226 VG_(get_IP)(VG_(get_running_tid)()),
227 "Recursive locking not allowed",
228 &MEI);
229 }
230}
231
sewardjaf44c822007-11-25 14:01:38 +0000232/**
233 * Update mutex_info state when locking the pthread_mutex_t mutex.
234 * Note: this function must be called after pthread_mutex_lock() has been
235 * called, or a race condition is triggered !
236 */
bart8bba1f72008-02-27 16:13:05 +0000237int mutex_post_lock(const Addr mutex, const SizeT size, MutexT mutex_type)
sewardjaf44c822007-11-25 14:01:38 +0000238{
239 const DrdThreadId drd_tid = VgThreadIdToDrdThreadId(VG_(get_running_tid)());
sewardj721ad7b2007-11-30 08:30:29 +0000240 struct mutex_info* const p = mutex_get_or_allocate(mutex, size, mutex_type);
sewardjaf44c822007-11-25 14:01:38 +0000241
242 if (s_trace_mutex)
243 {
244 const ThreadId tid = DrdThreadIdToVgThreadId(drd_tid);
245 VG_(message)(Vg_DebugMsg,
246 "drd_post_mutex_lock tid = %d/%d, %s 0x%lx rc %d owner %d",
247 tid,
248 drd_tid,
249 mutex_get_typename(p),
250 mutex,
251 p ? p->recursion_count : 0,
252 p ? p->owner : VG_INVALID_THREADID);
253 }
254
bart635cb162008-02-28 08:30:43 +0000255 if (mutex_type == mutex_type_invalid_mutex)
256 {
257 GenericErrInfo GEI;
258 VG_(maybe_record_error)(VG_(get_running_tid)(),
259 GenericErr,
260 VG_(get_IP)(VG_(get_running_tid)()),
261 "Invalid mutex",
262 &GEI);
263 }
264
bartab7a6442008-02-25 19:46:14 +0000265 if (p == 0)
266 {
barte883bc82008-02-26 19:13:04 +0000267 GenericErrInfo GEI;
bartab7a6442008-02-25 19:46:14 +0000268 VG_(maybe_record_error)(VG_(get_running_tid)(),
barte883bc82008-02-26 19:13:04 +0000269 GenericErr,
bartab7a6442008-02-25 19:46:14 +0000270 VG_(get_IP)(VG_(get_running_tid)()),
271 "Not a mutex",
barte883bc82008-02-26 19:13:04 +0000272 &GEI);
bartab7a6442008-02-25 19:46:14 +0000273 return 0;
274 }
275
bart5357fcb2008-02-27 15:46:00 +0000276#if 0
sewardj721ad7b2007-11-30 08:30:29 +0000277 tl_assert(mutex_type == mutex_type_mutex
278 || mutex_type == mutex_type_spinlock);
bart5357fcb2008-02-27 15:46:00 +0000279#endif
280
sewardj721ad7b2007-11-30 08:30:29 +0000281 tl_assert(p->mutex_type == mutex_type);
bart4bb53d82008-02-28 19:06:34 +0000282 tl_assert(p->a2 - p->a1 == size);
sewardj721ad7b2007-11-30 08:30:29 +0000283
sewardjaf44c822007-11-25 14:01:38 +0000284 if (p->recursion_count == 0)
285 {
286 p->owner = drd_tid;
287 s_mutex_lock_count++;
288 }
289 else if (p->owner != drd_tid)
290 {
291 VG_(message)(Vg_DebugMsg,
292 "The impossible happened: mutex 0x%lx is locked"
293 " simultaneously by two threads (recursion count %d,"
294 " owners %d and %d) !",
bart4bb53d82008-02-28 19:06:34 +0000295 p->a1, p->recursion_count, p->owner, drd_tid);
sewardj347eeba2008-01-21 14:19:07 +0000296 p->owner = drd_tid;
sewardjaf44c822007-11-25 14:01:38 +0000297 }
298 p->recursion_count++;
299
300 if (p->recursion_count == 1)
301 {
bartab7a6442008-02-25 19:46:14 +0000302 const DrdThreadId last_owner = p->owner;
303
sewardjaf44c822007-11-25 14:01:38 +0000304 if (last_owner != drd_tid && last_owner != DRD_INVALID_THREADID)
305 thread_combine_vc2(drd_tid, mutex_get_last_vc(mutex));
306 thread_new_segment(drd_tid);
307 }
308
309 return p->recursion_count;
310}
311
312/**
313 * Update mutex_info state when unlocking the pthread_mutex_t mutex.
314 * Note: this function must be called before pthread_mutex_unlock() is called,
315 * or a race condition is triggered !
316 * @param mutex Pointer to pthread_mutex_t data structure in the client space.
317 * @param tid ThreadId of the thread calling pthread_mutex_unlock().
318 * @param vc Pointer to the current vector clock of thread tid.
319 */
sewardj721ad7b2007-11-30 08:30:29 +0000320int mutex_unlock(const Addr mutex, const MutexT mutex_type)
sewardjaf44c822007-11-25 14:01:38 +0000321{
322 const DrdThreadId drd_tid = VgThreadIdToDrdThreadId(VG_(get_running_tid)());
323 const ThreadId vg_tid = DrdThreadIdToVgThreadId(drd_tid);
324 const VectorClock* const vc = thread_get_vc(drd_tid);
325 struct mutex_info* const p = mutex_get(mutex);
326
327 if (s_trace_mutex)
328 {
329 VG_(message)(Vg_DebugMsg,
330 "drd_pre_mutex_unlock tid = %d/%d, %s 0x%lx rc %d",
331 vg_tid, drd_tid,
332 mutex_get_typename(p),
333 mutex,
334 p->recursion_count,
335 p->owner);
336 }
337
bart635cb162008-02-28 08:30:43 +0000338 if (mutex_type == mutex_type_invalid_mutex)
339 {
340 GenericErrInfo GEI;
341 VG_(maybe_record_error)(VG_(get_running_tid)(),
342 GenericErr,
343 VG_(get_IP)(VG_(get_running_tid)()),
344 "Invalid mutex",
345 &GEI);
346 }
347
bart5357fcb2008-02-27 15:46:00 +0000348 if (p == 0)
bartab7a6442008-02-25 19:46:14 +0000349 {
barte883bc82008-02-26 19:13:04 +0000350 GenericErrInfo GEI;
bartab7a6442008-02-25 19:46:14 +0000351 VG_(maybe_record_error)(vg_tid,
barte883bc82008-02-26 19:13:04 +0000352 GenericErr,
bartab7a6442008-02-25 19:46:14 +0000353 VG_(get_IP)(vg_tid),
354 "Not a mutex",
barte883bc82008-02-26 19:13:04 +0000355 &GEI);
bartab7a6442008-02-25 19:46:14 +0000356 return 0;
357 }
358
bart5357fcb2008-02-27 15:46:00 +0000359 if (p->owner == DRD_INVALID_THREADID)
360 {
bart4bb53d82008-02-28 19:06:34 +0000361 MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
bart5357fcb2008-02-27 15:46:00 +0000362 VG_(maybe_record_error)(vg_tid,
363 MutexErr,
364 VG_(get_IP)(vg_tid),
365 "Mutex not locked",
366 &MEI);
367 return 0;
368 }
369
sewardjaf44c822007-11-25 14:01:38 +0000370 tl_assert(p);
bart5357fcb2008-02-27 15:46:00 +0000371 if (p->mutex_type != mutex_type)
372 {
373 VG_(message)(Vg_DebugMsg, "??? mutex %p: type changed from %d into %d",
bart4bb53d82008-02-28 19:06:34 +0000374 p->a1, p->mutex_type, mutex_type);
bart5357fcb2008-02-27 15:46:00 +0000375 }
sewardj721ad7b2007-11-30 08:30:29 +0000376 tl_assert(p->mutex_type == mutex_type);
sewardjaf44c822007-11-25 14:01:38 +0000377 tl_assert(p->owner != DRD_INVALID_THREADID);
bart5357fcb2008-02-27 15:46:00 +0000378#if 0
sewardj721ad7b2007-11-30 08:30:29 +0000379 tl_assert(mutex_type == mutex_type_mutex
380 || mutex_type == mutex_type_spinlock);
bart5357fcb2008-02-27 15:46:00 +0000381#endif
sewardj721ad7b2007-11-30 08:30:29 +0000382
sewardjaf44c822007-11-25 14:01:38 +0000383 if (p->owner != drd_tid)
384 {
bart4bb53d82008-02-28 19:06:34 +0000385 MutexErrInfo MEI = { p->a1, p->recursion_count, p->owner };
sewardjaf44c822007-11-25 14:01:38 +0000386 VG_(maybe_record_error)(vg_tid,
387 MutexErr,
388 VG_(get_IP)(vg_tid),
389 "Mutex not unlocked by owner thread",
390 &MEI);
391 }
392 p->recursion_count--;
sewardj347eeba2008-01-21 14:19:07 +0000393 if (p->recursion_count < 0)
394 {
395 MutexErrInfo MEI
bart4bb53d82008-02-28 19:06:34 +0000396 = { p->a1, p->recursion_count, p->owner };
sewardj347eeba2008-01-21 14:19:07 +0000397 VG_(maybe_record_error)(vg_tid,
398 MutexErr,
399 VG_(get_IP)(vg_tid),
400 "Attempt to unlock a mutex that is not locked",
401 &MEI);
402 p->recursion_count = 0;
403 }
404
sewardjaf44c822007-11-25 14:01:38 +0000405 if (p->recursion_count == 0)
406 {
407 /* This pthread_mutex_unlock() call really unlocks the mutex. Save the */
408 /* current vector clock of the thread such that it is available when */
409 /* this mutex is locked again. */
bart301c3112008-02-24 18:22:37 +0000410 vc_assign(&p->vc, vc);
sewardjaf44c822007-11-25 14:01:38 +0000411
412 thread_new_segment(drd_tid);
413 }
414 return p->recursion_count;
415}
416
417const char* mutex_get_typename(struct mutex_info* const p)
418{
419 tl_assert(p);
sewardj721ad7b2007-11-30 08:30:29 +0000420
sewardj347eeba2008-01-21 14:19:07 +0000421 return mutex_type_name(p->mutex_type);
422}
423
424const char* mutex_type_name(const MutexT mt)
425{
426 switch (mt)
sewardjaf44c822007-11-25 14:01:38 +0000427 {
bart635cb162008-02-28 08:30:43 +0000428 case mutex_type_invalid_mutex:
429 return "invalid mutex";
bart5357fcb2008-02-27 15:46:00 +0000430 case mutex_type_recursive_mutex:
431 return "recursive mutex";
432 case mutex_type_errorcheck_mutex:
433 return "error checking mutex";
434 case mutex_type_default_mutex:
sewardjaf44c822007-11-25 14:01:38 +0000435 return "mutex";
sewardj721ad7b2007-11-30 08:30:29 +0000436 case mutex_type_spinlock:
sewardjaf44c822007-11-25 14:01:38 +0000437 return "spinlock";
438 default:
439 tl_assert(0);
440 }
441 return "?";
442}
443
bart5357fcb2008-02-27 15:46:00 +0000444/** Return true if the specified mutex is locked by any thread. */
445static Bool mutex_is_locked(struct mutex_info* const p)
446{
447 tl_assert(p);
448 return (p->recursion_count > 0);
449}
450
sewardjaf44c822007-11-25 14:01:38 +0000451Bool mutex_is_locked_by(const Addr mutex, const DrdThreadId tid)
452{
453 struct mutex_info* const p = mutex_get(mutex);
sewardjaf44c822007-11-25 14:01:38 +0000454 if (p)
455 {
456 return (p->recursion_count > 0 && p->owner == tid);
457 }
458 return False;
459}
460
461const VectorClock* mutex_get_last_vc(const Addr mutex)
462{
463 struct mutex_info* const p = mutex_get(mutex);
464 return p ? &p->vc : 0;
465}
466
467int mutex_get_recursion_count(const Addr mutex)
468{
469 struct mutex_info* const p = mutex_get(mutex);
470 tl_assert(p);
471 return p->recursion_count;
472}
473
474/**
bart301c3112008-02-24 18:22:37 +0000475 * Call this function when thread tid stops to exist, such that the
sewardjaf44c822007-11-25 14:01:38 +0000476 * "last owner" field can be cleared if it still refers to that thread.
sewardjaf44c822007-11-25 14:01:38 +0000477 */
bart301c3112008-02-24 18:22:37 +0000478void mutex_thread_delete(const DrdThreadId tid)
sewardjaf44c822007-11-25 14:01:38 +0000479{
bart4bb53d82008-02-28 19:06:34 +0000480 struct mutex_info* p;
481
482 drd_clientobj_resetiter();
483 for ( ; (p = &drd_clientobj_next(ClientMutex)->mutex) != 0; )
sewardjaf44c822007-11-25 14:01:38 +0000484 {
bart4bb53d82008-02-28 19:06:34 +0000485 if (p->owner == tid && p->recursion_count > 0)
sewardjaf44c822007-11-25 14:01:38 +0000486 {
bart5357fcb2008-02-27 15:46:00 +0000487 MutexErrInfo MEI
bart4bb53d82008-02-28 19:06:34 +0000488 = { p->a1, p->recursion_count, p->owner };
bart5357fcb2008-02-27 15:46:00 +0000489 VG_(maybe_record_error)(VG_(get_running_tid)(),
490 MutexErr,
491 VG_(get_IP)(VG_(get_running_tid)()),
492 "Mutex still locked at thread exit",
493 &MEI);
sewardjaf44c822007-11-25 14:01:38 +0000494 p->owner = VG_INVALID_THREADID;
495 }
496 }
497}
498
sewardjaf44c822007-11-25 14:01:38 +0000499ULong get_mutex_lock_count(void)
500{
501 return s_mutex_lock_count;
502}
sewardj347eeba2008-01-21 14:19:07 +0000503
504
505/*
506 * Local variables:
507 * c-basic-offset: 3
508 * End:
509 */