Bug 827007: Implement Stop for UserMediaStreams; add NotifyRemoved for MediaStream...
[gecko.git] / js / jsd / jsd_lock.h
bloba3eb821be953bf85c0388a51fb65d9c75ca119a6
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 /*
7 * Header for JavaScript Debugging support - Locking and threading functions
8 */
10 #ifndef jsd_lock_h___
11 #define jsd_lock_h___
13 /*
14 * If you want to support threading and locking, define JSD_THREADSAFE and
15 * implement the functions below.
19 * NOTE: These locks must be reentrant in the sense that they support
20 * nested calls to lock and unlock.
23 typedef struct JSDStaticLock JSDStaticLock;
25 extern JSDStaticLock*
26 jsd_CreateLock();
28 extern void
29 jsd_Lock(JSDStaticLock* lock);
31 extern void
32 jsd_Unlock(JSDStaticLock* lock);
34 #ifdef DEBUG
35 extern JSBool
36 jsd_IsLocked(JSDStaticLock* lock);
37 #endif /* DEBUG */
39 extern void*
40 jsd_CurrentThread();
42 #endif /* jsd_lock_h___ */