diff options
Diffstat (limited to 'src/thread.h')
| -rw-r--r-- | src/thread.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/thread.h b/src/thread.h index 32ef48f63ff..6b66ea4d1c3 100644 --- a/src/thread.h +++ b/src/thread.h | |||
| @@ -187,7 +187,7 @@ struct thread_state | |||
| 187 | struct thread_state *next_thread; | 187 | struct thread_state *next_thread; |
| 188 | }; | 188 | }; |
| 189 | 189 | ||
| 190 | /* A mutex in lisp is represented by a pthread condition variable. | 190 | /* A mutex in lisp is represented by a system condition variable. |
| 191 | The system mutex associated with this condition variable is the | 191 | The system mutex associated with this condition variable is the |
| 192 | global lock. | 192 | global lock. |
| 193 | 193 | ||
| @@ -195,17 +195,23 @@ struct thread_state | |||
| 195 | lisp mutexes. */ | 195 | lisp mutexes. */ |
| 196 | typedef struct | 196 | typedef struct |
| 197 | { | 197 | { |
| 198 | /* The owning thread, or NULL if unlocked. */ | ||
| 198 | struct thread_state *owner; | 199 | struct thread_state *owner; |
| 200 | /* The lock count. */ | ||
| 199 | unsigned int count; | 201 | unsigned int count; |
| 202 | /* The underlying system condition variable. */ | ||
| 200 | sys_cond_t condition; | 203 | sys_cond_t condition; |
| 201 | } lisp_mutex_t; | 204 | } lisp_mutex_t; |
| 202 | 205 | ||
| 206 | /* A mutex as a lisp object. */ | ||
| 203 | struct Lisp_Mutex | 207 | struct Lisp_Mutex |
| 204 | { | 208 | { |
| 205 | struct vectorlike_header header; | 209 | struct vectorlike_header header; |
| 206 | 210 | ||
| 211 | /* The name of the mutex, or nil. */ | ||
| 207 | Lisp_Object name; | 212 | Lisp_Object name; |
| 208 | 213 | ||
| 214 | /* The lower-level mutex object. */ | ||
| 209 | lisp_mutex_t mutex; | 215 | lisp_mutex_t mutex; |
| 210 | }; | 216 | }; |
| 211 | 217 | ||