Roxen.git/
server/
etc/
modules/
RXML.pmod/
module.pmod
Branch:
Tag:
Non-build tags
All tags
No tags
2000-02-12
2000-02-12 21:24:03 by Martin Stjernholm <mast@lysator.liu.se>
2d2034b5ad58256323347453cccd7ca01bb47768 (
13
lines) (+
9
/-
4
)
[
Show
|
Annotate
]
Branch:
5.2
Fixed too strong debug check.
Rev: server/etc/modules/RXML.pmod/module.pmod:1.49
2:
//! //! Created 1999-07-30 by Martin Stjernholm. //!
-
//! $Id: module.pmod,v 1.
48
2000/02/
11
01
:
08
:
25
mast Exp $
+
//! $Id: module.pmod,v 1.
49
2000/02/
12
21
:
24
:
03
mast Exp $
//! Kludge: Must use "RXML.refs" somewhere for the whole module to be //! loaded correctly.
1044:
string _sprintf() {return "RXML.Context" + PAREN_CNT (__count);} #ifdef MODULE_DEBUG
+
#if constant (thread_create)
+
Thread.Thread in_use;
+
#else
int in_use; #endif
-
+
#endif
}
1063:
inline Context get_context() {return _context;} #endif
-
#
ifdef
MODULE_DEBUG
+
#
if
defined (
MODULE_DEBUG
) && constant (thread_create)
// Got races in this debug check, but looks like we have to live with that. :\
1071:
Context __old_ctx = get_context(); \ set_context (ctx); \ if (ctx) { \
-
if (ctx->in_use &&
__old_
ctx !=
ctx
)
\
+
if (ctx->in_use &&
ctx->in
_
use
!=
this_thread(
)
)
\
error ("Attempt to use context asynchronously.\n"); \
-
ctx->in_use =
1
;
\
+
ctx->in_use =
this_thread()
; \
} #define LEAVE_CONTEXT() \