Handles: 2 The Global Handle Table

Up: GEOS SDK TechDocs | Up | Prev: 1 Design Philosophy | Next: 3 Local Handles

Many handles refer to things which are managed by the kernel. These things include global memory blocks, disk volumes, files, and many other things. Each of these things has an entry in the global handle table. Only the GEOS kernel may directly access the global handle table. If a geode wants to access one of these things, it must call a system routine and pass the thing's handle.

Global handles may not be saved across sessions of GEOS. The global handle table has to be rebuilt each time GEOS is launched. For example, when GEOS shuts down, all open files are closed. When an application restores from state, it may choose to reopen a file; it will then be given the file's handle, which will almost certainly be different from the file's handle during the previous session.

Sometimes several threads will be using the same global handle, and they will need to synchronize their access to it. They can arrange this by using the HandleP() and HandleV() routines. These routines are most often used to synchronize access to a global memory block; for this reason, they are documented in the Memory Management chapter.


Up: GEOS SDK TechDocs | Up | Prev: 1 Design Philosophy | Next: 3 Local Handles