Use int instead of bool ... libraries sometimes redefine bool in headers.
This commit is contained in:
parent
976e3af24b
commit
90697e35ba
@ -39,7 +39,6 @@
|
|||||||
#define _GUAC_SOCKET_H
|
#define _GUAC_SOCKET_H
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdbool.h>
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -193,7 +192,7 @@ struct guac_socket {
|
|||||||
* Whether instructions should be guaranteed atomic across threads using
|
* Whether instructions should be guaranteed atomic across threads using
|
||||||
* locks. By default, thread safety is disabled on sockets.
|
* locks. By default, thread safety is disabled on sockets.
|
||||||
*/
|
*/
|
||||||
bool __threadsafe_instructions;
|
int __threadsafe_instructions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lock which is acquired when an instruction is being written, and
|
* Lock which is acquired when an instruction is being written, and
|
||||||
|
@ -157,7 +157,7 @@ guac_socket* guac_socket_alloc() {
|
|||||||
|
|
||||||
|
|
||||||
/* Default to unsafe threading */
|
/* Default to unsafe threading */
|
||||||
socket->__threadsafe_instructions = false;
|
socket->__threadsafe_instructions = 0;
|
||||||
pthread_mutex_init(&(socket->__instruction_write_lock), NULL);
|
pthread_mutex_init(&(socket->__instruction_write_lock), NULL);
|
||||||
|
|
||||||
/* No handlers yet */
|
/* No handlers yet */
|
||||||
@ -171,7 +171,7 @@ guac_socket* guac_socket_alloc() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void guac_socket_require_threadsafe(guac_socket* socket) {
|
void guac_socket_require_threadsafe(guac_socket* socket) {
|
||||||
socket->__threadsafe_instructions = true;
|
socket->__threadsafe_instructions = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void guac_socket_instruction_begin(guac_socket* socket) {
|
void guac_socket_instruction_begin(guac_socket* socket) {
|
||||||
|
Loading…
Reference in New Issue
Block a user