X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fcurses.priv.h;h=21618dc35818b5c11d1bc5ebda68f414d592921d;hp=940d535d8d97395f55aa4ad478893a835928f711;hb=cc79c103a0ba4c9cef4f875de199be1502727b9b;hpb=491a3f08b795f494ae17179338c31a11b18fd433;ds=inline diff --git a/ncurses/curses.priv.h b/ncurses/curses.priv.h index 940d535d..21618dc3 100644 --- a/ncurses/curses.priv.h +++ b/ncurses/curses.priv.h @@ -34,7 +34,7 @@ /* - * $Id: curses.priv.h,v 1.346 2007/10/13 18:55:29 Miroslav.Lichvar Exp $ + * $Id: curses.priv.h,v 1.347 2007/10/20 19:56:55 tom Exp $ * * curses.priv.h * @@ -305,20 +305,25 @@ color_t; #include #define _nc_lock_global(name) pthread_mutex_lock(&_nc_globals.mutex_##name) #define _nc_unlock_global(name) pthread_mutex_unlock(&_nc_globals.mutex_##name) + +extern NCURSES_EXPORT(void) _nc_lock_window(WINDOW *); +extern NCURSES_EXPORT(void) _nc_unlock_window(WINDOW *); + #else #error POSIX threads requires --enable-reentrant option #endif #else #define _nc_lock_global(name) /* nothing */ #define _nc_unlock_global(name) /* nothing */ + +#define _nc_lock_window(name) TRUE +#define _nc_unlock_window(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 */ @@ -559,6 +564,7 @@ typedef struct { #ifdef USE_PTHREADS pthread_mutex_t mutex_set_SP; pthread_mutex_t mutex_use_screen; + pthread_mutex_t mutex_use_window; pthread_mutex_t mutex_windowlist; pthread_mutex_t mutex_tst_tracef; pthread_mutex_t mutex_tracef; @@ -840,6 +846,9 @@ extern NCURSES_EXPORT_VAR(SIG_ATOMIC_T) _nc_have_sigwinch; int addch_x; /* x-position for addch_work[] */ int addch_y; /* y-position for addch_work[] */ #endif +#ifdef USE_PTHREADS + pthread_mutex_t mutex_use_window; +#endif }; #define WINDOW_EXT(win,field) (((WINDOWLIST *)(win))->field)