ext/zookeeper_lib.h in zookeeper-0.4.2 vs ext/zookeeper_lib.h in zookeeper-0.4.3
- old
+ new
@@ -20,10 +20,11 @@
#ifndef RARRAY_LEN
# define RARRAY_LEN(x) RARRAY(x)->len
#endif
extern int ZKRBDebugging;
+extern pthread_mutex_t zkrb_q_mutex;
struct zkrb_data_completion {
char *data;
struct Stat *stat;
};
@@ -92,21 +93,23 @@
};
typedef struct {
struct zkrb_event_ll_t *head;
struct zkrb_event_ll_t *tail;
+ int pipe_read;
+ int pipe_write;
} zkrb_queue_t;
zkrb_queue_t * zkrb_queue_alloc(void);
void zkrb_queue_free(zkrb_queue_t *queue);
zkrb_event_t * zkrb_event_alloc(void);
void zkrb_event_free(zkrb_event_t *ptr);
/* push/pop is a misnomer, this is a queue */
void zkrb_enqueue(zkrb_queue_t *queue, zkrb_event_t *elt);
zkrb_event_t * zkrb_peek(zkrb_queue_t *queue);
-zkrb_event_t * zkrb_dequeue(zkrb_queue_t *queue);
+zkrb_event_t * zkrb_dequeue(zkrb_queue_t *queue, int need_lock);
void zkrb_print_stat(const struct Stat *s);
typedef struct {
int64_t req_id;
@@ -152,10 +155,10 @@
VALUE zkrb_stat_to_rarray(const struct Stat *stat);
VALUE zkrb_stat_to_rhash(const struct Stat* stat);
struct ACL_vector * zkrb_ruby_to_aclvector(VALUE acl_ary);
struct ACL_vector * zkrb_clone_acl_vector(struct ACL_vector * src);
-struct String_vector * zkrb_clone_string_vector(struct String_vector * src);
+struct String_vector * zkrb_clone_string_vector(const struct String_vector * src);
struct ACL zkrb_ruby_to_acl(VALUE rubyacl);
struct Id zkrb_ruby_to_id(VALUE rubyid);
#endif /* ZOOKEEPER_LIB_H */