summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/lib/osdlib.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-01-09 03:01:20 +0100
committer couriersud <couriersud@arcor.de>2015-01-09 03:01:20 +0100
commit14e96b6f9ddd13afad902d79baf9402e46ee36fd (patch)
treefbc3f5f01d55388a756ea56e9ca9978206c22305 /src/osd/modules/lib/osdlib.h
parent944805f253568ab1978b7497adbdcc1ef13ffea8 (diff)
- Moved OS specific low level code to osd/modules/lib.
- Removed duplicate code - Should support LIB/BASELIB separation better going forward
Diffstat (limited to 'src/osd/modules/lib/osdlib.h')
-rw-r--r--src/osd/modules/lib/osdlib.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/osd/modules/lib/osdlib.h b/src/osd/modules/lib/osdlib.h
new file mode 100644
index 00000000000..f9c364d5464
--- /dev/null
+++ b/src/osd/modules/lib/osdlib.h
@@ -0,0 +1,78 @@
+//============================================================
+//
+// osdlib.h
+//
+// Copyright (c) 1996-2014, Nicola Salmoria and the MAME Team.
+// Visit http://mamedev.org for licensing and usage restrictions.
+//
+// SDLMAME by Olivier Galibert and R. Belmont
+//
+// - Common low level routines
+// - Source files also provide the following from osdcore.h
+//
+// - osd_ticks
+// - osd_sleep
+// - osd_malloc
+// - osd_malloc_array
+// - osd_free
+//============================================================
+
+#ifndef __OSDLIB__
+#define __OSDLIB__
+
+/*-----------------------------------------------------------------------------
+ osd_num_processors: return the number of processors
+
+ Parameters:
+
+ None.
+
+ Return value:
+
+ Number of processors
+-----------------------------------------------------------------------------*/
+int osd_get_num_processors(void);
+
+/*-----------------------------------------------------------------------------
+ osd_process_kill: kill the current process
+
+ Parameters:
+
+ None.
+
+ Return value:
+
+ None.
+-----------------------------------------------------------------------------*/
+void osd_process_kill(void);
+
+/*-----------------------------------------------------------------------------
+ osd_getenv: return pointer to environment variable
+
+ Parameters:
+
+ name - name of environment variable
+
+ Return value:
+
+ pointer to value
+-----------------------------------------------------------------------------*/
+char *osd_getenv(const char *name);
+
+/*-----------------------------------------------------------------------------
+ osd_setenv: set environment variable
+
+ Parameters:
+
+ name - name of environment variable
+ value - value to write
+ overwrite - overwrite if it exists
+
+ Return value:
+
+ 0 on success
+-----------------------------------------------------------------------------*/
+
+int osd_setenv(const char *name, const char *value, int overwrite);
+
+#endif /* __OSDLIB__ */