1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-08-07 08:06:38 +02:00

Some documentation improvements

This commit is contained in:
jfreegman
2021-12-05 17:03:42 -05:00
parent 8aa57b0539
commit e9a0a30408
6 changed files with 19 additions and 9 deletions

View File

@@ -32,7 +32,7 @@
#define PASSWORD_EVAL_MAX 512
/* holds user setting values */
/* Holds user setting values defined in the toxic config file. */
struct user_settings {
int autolog; /* boolean */
int alerts; /* boolean */

View File

@@ -101,6 +101,9 @@ struct Winthread Winthread;
struct cqueue_thread cqueue_thread;
struct av_thread av_thread;
struct arg_opts arg_opts;
// This struct is not thread safe. It should only ever be written to from the main thread
// before any other thread that uses it is initialized.
struct user_settings *user_settings = NULL;
static struct user_password {

View File

@@ -98,6 +98,13 @@ typedef enum {
Uncomment if necessary */
/* #define URXVT_FIX */
/*
* Used to control access to global variables via a mutex, as well as to handle signals.
* Any file, variable or data structure that is used by the UI/Window thread and any other thread
* must be guarded by `lock`.
*
* There should only ever be one instance of this struct.
*/
struct Winthread {
pthread_t tid;
pthread_mutex_t lock;