/****************************************************************************
- * Copyright 2018,2020 Thomas E. Dickey *
+ * Copyright 2018-2021,2022 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_data.c,v 1.84 2021/08/19 08:01:33 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.87 2022/07/09 22:03:21 tom Exp $")
/*
* OS/2's native linker complains if we don't initialize public data when
TGETENT_0s, /* tgetent_cache */
0, /* tgetent_index */
0, /* tgetent_sequence */
+ 0, /* terminal_count */
0, /* dbd_blob */
0, /* dbd_list */
NCURSES_EXPORT(int)
_nc_mutex_lock(pthread_mutex_t * obj)
{
- if (_nc_use_pthreads == 0)
- return 0;
- return pthread_mutex_lock(obj);
+ int rc = 0;
+ if (_nc_use_pthreads != 0)
+ rc = pthread_mutex_lock(obj);
+ return rc;
}
NCURSES_EXPORT(int)
_nc_mutex_trylock(pthread_mutex_t * obj)
{
- if (_nc_use_pthreads == 0)
- return 0;
- return pthread_mutex_trylock(obj);
+ int rc = 0;
+ if (_nc_use_pthreads != 0)
+ rc = pthread_mutex_trylock(obj);
+ return rc;
}
NCURSES_EXPORT(int)
_nc_mutex_unlock(pthread_mutex_t * obj)
{
- if (_nc_use_pthreads == 0)
- return 0;
- return pthread_mutex_unlock(obj);
+ int rc = 0;
+ if (_nc_use_pthreads != 0)
+ rc = pthread_mutex_unlock(obj);
+ return rc;
}
#endif /* USE_PTHREADS */