Boron 2.1.0
env.h
1#ifndef ENV_H
2#define ENV_H
3/*
4 Copyright 2009,2010 Karl Robillard
5
6 This file is part of the Urlan datatype system.
7
8 Urlan is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 Urlan is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with Urlan. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22
23#include "urlan.h"
24#include "os.h"
25
26
27#define LOCK_GLOBAL mutexLock( env->mutex );
28#define UNLOCK_GLOBAL mutexUnlock( env->mutex );
29
30
31struct UEnv
32{
33 OSMutex mutex;
34 UBuffer sharedStore;
35 UBuffer atomNames; // Protected by mutex.
36 UBuffer atomTable; // Protected by mutex.
37 uint16_t typeCount;
38 uint16_t threadCount; // Protected by mutex.
39 uint32_t threadSize;
40 void (*threadFunc)( UThread*, enum UThreadMethod );
41 UThread* initialThread;
42 const UDatatype* types[ UT_MAX ];
43};
44
45
46#endif /*EOF*/
The UBuffer struct holds information about a resource, usually a chuck of memory.
Definition: urlan.h:266
The UDatatype struct holds methods for a specific class of data.
Definition: urlan.h:432
The UThread struct stores the data specific to a thread of execution.
Definition: urlan.h:309
The Urlan programmer interface.
UThreadMethod
Definition: urlan.h:301