]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/curses.priv.h
ncurses 5.6 - patch 20070908
[ncurses.git] / ncurses / curses.priv.h
index 5cccaad5f1b7e56565de267bb8f4a3b5e5eefd72..973eb998e3fd8119840df419306f7eeadcf68d64 100644 (file)
@@ -34,7 +34,7 @@
 
 
 /*
- * $Id: curses.priv.h,v 1.337 2007/08/12 13:14:12 tom Exp $
+ * $Id: curses.priv.h,v 1.340 2007/09/08 21:44:40 tom Exp $
  *
  *     curses.priv.h
  *
@@ -300,6 +300,25 @@ color_t;
 #define SET_COLS(value)  COLS = value
 #endif
 
+#ifdef USE_PTHREADS
+#if USE_REENTRANT
+#include <pthread.h>
+#define _nc_lock_global(name)  pthread_mutex_lock(&_nc_globals.mutex_##name)
+#define _nc_unlock_global(name)        pthread_mutex_unlock(&_nc_globals.mutex_##name)
+#else
+#error POSIX threads requires --enable-reentrant option
+#endif
+#else
+#define _nc_lock_global(name)  /* nothing */
+#define _nc_unlock_global(name)        /* nothing */
+#endif
+
+#define _nc_lock_screen(name)  /* nothing */
+#define _nc_unlock_screen(name)        /* nothing */
+
+#define _nc_lock_window(name)  /* nothing */
+#define _nc_unlock_window(name)        /* nothing */
+
 /*
  * Definitions for color pairs
  */
@@ -536,6 +555,12 @@ typedef struct {
 #endif /* USE_TERMLIB */
 
 #endif /* TRACE */
+
+#ifdef USE_PTHREADS
+       pthread_mutex_t mutex_set_SP;
+       pthread_mutex_t mutex_use_screen;
+       pthread_mutex_t mutex_windowlist;
+#endif
 } NCURSES_GLOBALS;
 
 extern NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals;