Skip to content
Snippets Groups Projects
Commit c583d3ef authored by Fredrik Noring's avatar Fredrik Noring
Browse files

Now works without threads too.

Rev: lib/modules/Yabu.pmod/module.pmod:1.10
parent c8c4f674
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
* associated with a unique key.
*/
constant cvs_id = "$Id: module.pmod,v 1.9 1999/03/03 22:37:46 noring Exp $";
constant cvs_id = "$Id: module.pmod,v 1.10 1999/06/14 20:10:57 noring Exp $";
#define ERR(msg) throw(({ "(Yabu) "+msg+"\n", backtrace() }))
#define WARN(msg) werror(msg)
......@@ -15,7 +15,7 @@ constant cvs_id = "$Id: module.pmod,v 1.9 1999/03/03 22:37:46 noring Exp $";
#define THREAD_SAFE
#define LOCK() do { object key___; catch(key___=lock())
#define UNLOCK() key___=0; } while(0)
#define INHERIT_MUTEX static inherit Thread.Mutex
#define INHERIT_MUTEX static inherit Thread.Mutex;
#else
#undef THREAD_SAFE
#define LOCK() do {
......@@ -124,7 +124,7 @@ class YabuLog {
*
*/
static private class FileIO {
INHERIT_MUTEX;
INHERIT_MUTEX
static private inherit Stdio.File:file;
static private void seek(int offset)
......@@ -181,7 +181,7 @@ static private class FileIO {
*
*/
class Chunk {
INHERIT_MUTEX;
INHERIT_MUTEX
static private inherit FileIO:file;
static private object parent;
......@@ -603,7 +603,7 @@ class Transaction {
*
*/
class Table {
INHERIT_MUTEX;
INHERIT_MUTEX
static private object index, db, lock_file;
static private string mode, filename;
......@@ -1115,7 +1115,7 @@ class _Table {
*
*/
class db {
INHERIT_MUTEX;
INHERIT_MUTEX
static string dir, mode;
static mapping tables = ([]), table_refs = ([]);
......@@ -1269,7 +1269,7 @@ class db {
* data records.
*/
class LookupTable {
INHERIT_MUTEX;
INHERIT_MUTEX
static private int minx;
static private object table;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment