~ubuntu-branches/ubuntu/natty/libxcb/natty

« back to all changes in this revision

Viewing changes to src/xcbint.h

  • Committer: Bazaar Package Importer
  • Author(s): Julien Danjou
  • Date: 2009-02-17 14:09:31 UTC
  • mto: (2.2.1 sid) (1.1.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090217140931-q3v3ihpvmid8m7ib
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
enum workarounds {
42
42
    WORKAROUND_NONE,
43
 
    WORKAROUND_GLX_GET_FB_CONFIGS_BUG
 
43
    WORKAROUND_GLX_GET_FB_CONFIGS_BUG,
 
44
    WORKAROUND_EXTERNAL_SOCKET_OWNER
44
45
};
45
46
 
46
47
enum lazy_reply_tag
52
53
 
53
54
#define XCB_PAD(i) (-(i) & 3)
54
55
 
55
 
#define XCB_SEQUENCE_COMPARE(a,op,b)    ((int) ((a) - (b)) op 0)
 
56
#define XCB_SEQUENCE_COMPARE(a,op,b)    ((int64_t) ((a) - (b)) op 0)
 
57
#define XCB_SEQUENCE_COMPARE_32(a,op,b) (((int) (a) - (int) (b)) op 0)
 
58
 
 
59
#ifndef offsetof
 
60
#define offsetof(type,member) ((size_t) &((type *)0)->member)
 
61
#endif
 
62
 
 
63
#define container_of(pointer,type,member) ((type *)(((char *)(pointer)) - offsetof(type, member)))
56
64
 
57
65
/* xcb_list.c */
58
66
 
72
80
    pthread_cond_t cond;
73
81
    int writing;
74
82
 
75
 
    char queue[4096];
 
83
    pthread_cond_t socket_cond;
 
84
    void (*return_socket)(void *closure);
 
85
    void *socket_closure;
 
86
    int socket_moving;
 
87
 
 
88
    char queue[XCB_QUEUE_BUFFER_SIZE];
76
89
    int queue_len;
77
90
 
78
 
    unsigned int request;
79
 
    unsigned int request_written;
 
91
    uint64_t request;
 
92
    uint64_t request_written;
80
93
 
81
94
    pthread_mutex_t reqlenlock;
82
95
    enum lazy_reply_tag maximum_request_length_tag;
90
103
void _xcb_out_destroy(_xcb_out *out);
91
104
 
92
105
int _xcb_out_send(xcb_connection_t *c, struct iovec **vector, int *count);
93
 
int _xcb_out_flush_to(xcb_connection_t *c, unsigned int request);
 
106
int _xcb_out_flush_to(xcb_connection_t *c, uint64_t request);
94
107
 
95
108
 
96
109
/* xcb_in.c */
102
115
    char queue[4096];
103
116
    int queue_len;
104
117
 
105
 
    unsigned int request_expected;
106
 
    unsigned int request_read;
107
 
    unsigned int request_completed;
 
118
    uint64_t request_expected;
 
119
    uint64_t request_read;
 
120
    uint64_t request_completed;
108
121
    struct reply_list *current_reply;
109
122
    struct reply_list **current_reply_tail;
110
123
 
120
133
int _xcb_in_init(_xcb_in *in);
121
134
void _xcb_in_destroy(_xcb_in *in);
122
135
 
123
 
int _xcb_in_expect_reply(xcb_connection_t *c, unsigned int request, enum workarounds workaround, int flags);
 
136
int _xcb_in_expect_reply(xcb_connection_t *c, uint64_t request, enum workarounds workaround, int flags);
 
137
void _xcb_in_replies_done(xcb_connection_t *c);
124
138
 
125
139
int _xcb_in_read(xcb_connection_t *c);
126
140
int _xcb_in_read_block(xcb_connection_t *c, void *buf, int nread);
127
141
 
128
142
 
129
 
/* xcb_xlib.c */
130
 
 
131
 
typedef struct _xcb_xlib {
132
 
    int lock;
133
 
    int sloppy_lock;
134
 
    pthread_t thread;
135
 
    pthread_cond_t cond;
136
 
} _xcb_xlib;
137
 
 
138
 
 
139
143
/* xcb_xid.c */
140
144
 
141
145
typedef struct _xcb_xid {
173
177
 
174
178
    /* I/O data */
175
179
    pthread_mutex_t iolock;
176
 
    _xcb_xlib xlib;
177
180
    _xcb_in in;
178
181
    _xcb_out out;
179
182
 
183
186
};
184
187
 
185
188
void _xcb_conn_shutdown(xcb_connection_t *c);
186
 
void _xcb_wait_io(xcb_connection_t *c, pthread_cond_t *cond);
187
189
int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count);
188
190
 
189
191
 
195
197
#pragma GCC visibility pop
196
198
#endif
197
199
 
198
 
 
199
 
/* xcb_conn.c symbols visible to xcb-xlib */
200
 
 
201
 
void _xcb_lock_io(xcb_connection_t *c);
202
 
void _xcb_unlock_io(xcb_connection_t *c);
203
 
 
204
200
#endif