Windows console I/O overhaul
[sbcl.git] / src / runtime / os.h
index 8384ef3..9dd1649 100644 (file)
@@ -189,4 +189,21 @@ extern char *os_get_runtime_executable_path(int external_path);
 # define OS_VM_SIZE_FMTX "lx"
 #endif
 
+/* FIXME: this is not the right place for this, but here we have
+ * a convenient base type to hand. If it turns out we can just use
+ * size_t everywhere, this can more to runtime.h. */
+typedef os_vm_size_t word_t;
+#define WORD_FMTX OS_VM_SIZE_FMTX
+
+#ifdef LISP_FEATURE_SB_THREAD
+#  ifndef CANNOT_USE_POSIX_SEM_T
+#    include <semaphore.h>
+     typedef sem_t os_sem_t;
+#  endif
+   void os_sem_init(os_sem_t *sem, unsigned int value);
+   void os_sem_wait(os_sem_t *sem, char *what);
+   void os_sem_post(os_sem_t *sem, char *what);
+   void os_sem_destroy(os_sem_t *sem);
+#endif
+
 #endif