diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-15 14:57:07 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-15 14:57:07 +0100 |
| commit | 1c72527dc816c1cd24fcff338b56c7617aa21c75 (patch) | |
| tree | b51f68473a2819f6e59aefa28004f7a1b720946c /src/libtools/myalign.c | |
| parent | 5ce3e2991360771bf5ed9b2b8c7228c742e5134b (diff) | |
| download | box64-1c72527dc816c1cd24fcff338b56c7617aa21c75.tar.gz box64-1c72527dc816c1cd24fcff338b56c7617aa21c75.zip | |
[BOX32][WRAPPER] Some work on 32bits xcb_connection
Diffstat (limited to 'src/libtools/myalign.c')
| -rw-r--r-- | src/libtools/myalign.c | 116 |
1 files changed, 3 insertions, 113 deletions
diff --git a/src/libtools/myalign.c b/src/libtools/myalign.c index 599ce904..3bd71237 100644 --- a/src/libtools/myalign.c +++ b/src/libtools/myalign.c @@ -1241,121 +1241,11 @@ void myStackAlignGVariantNew(x64emu_t* emu, const char* fmt, uint64_t* scratch, #endif -#define MUTEX_SIZE_X64 40 -typedef struct my_xcb_ext_s { - pthread_mutex_t lock; - struct lazyreply *extensions; - int extensions_size; -} my_xcb_ext_t; - -typedef struct x64_xcb_ext_s { - uint8_t lock[MUTEX_SIZE_X64]; - struct lazyreply *extensions; - int extensions_size; -} x64_xcb_ext_t; - -typedef struct my_xcb_xid_s { - pthread_mutex_t lock; - uint32_t last; - uint32_t base; - uint32_t max; - uint32_t inc; -} my_xcb_xid_t; - -typedef struct x64_xcb_xid_s { - uint8_t lock[MUTEX_SIZE_X64]; - uint32_t last; - uint32_t base; - uint32_t max; - uint32_t inc; -} x64_xcb_xid_t; - -typedef struct my_xcb_fd_s { - int fd[16]; - int nfd; - int ifd; -} my_xcb_fd_t; - -typedef struct my_xcb_in_s { - pthread_cond_t event_cond; - int reading; - char queue[4096]; - int queue_len; - uint64_t request_expected; - uint64_t request_read; - uint64_t request_completed; - struct reply_list *current_reply; - struct reply_list **current_reply_tail; - void* replies; - struct event_list *events; - struct event_list **events_tail; - struct reader_list *readers; - struct special_list *special_waiters; - struct pending_reply *pending_replies; - struct pending_reply **pending_replies_tail; - my_xcb_fd_t in_fd; - struct xcb_special_event *special_events; -} my_xcb_in_t; - -typedef struct x64_xcb_out_s { - pthread_cond_t cond; - int writing; - pthread_cond_t socket_cond; - void (*return_socket)(void *closure); - void *socket_closure; - int socket_moving; - char queue[16384]; - int queue_len; - uint64_t request; - uint64_t request_written; - uint8_t reqlenlock[40]; - int maximum_request_length_tag; - uint32_t maximum_request_length; - my_xcb_fd_t out_fd; -} x64_xcb_out_t; - -typedef struct my_xcb_out_s { - pthread_cond_t cond; - int writing; - pthread_cond_t socket_cond; - void (*return_socket)(void *closure); - void *socket_closure; - int socket_moving; - char queue[16384]; - int queue_len; - uint64_t request; - uint64_t request_written; - pthread_mutex_t reqlenlock; - int maximum_request_length_tag; - uint32_t maximum_request_length; - my_xcb_fd_t out_fd; -} my_xcb_out_t; - -typedef struct my_xcb_connection_s { - int has_error; - void *setup; - int fd; - pthread_mutex_t iolock; - my_xcb_in_t in; - my_xcb_out_t out; - my_xcb_ext_t ext; - my_xcb_xid_t xid; -} my_xcb_connection_t; - -typedef struct x64_xcb_connection_s { - int has_error; - void *setup; - int fd; - uint8_t iolock[MUTEX_SIZE_X64]; - my_xcb_in_t in; - x64_xcb_out_t out; - x64_xcb_ext_t ext; - x64_xcb_xid_t xid; -} x64_xcb_connection_t; +#include "my_xcb_defs.h" #define NXCB 8 -my_xcb_connection_t* my_xcb_connects[NXCB] = {0}; -x64_xcb_connection_t x64_xcb_connects[NXCB] = {0}; +static my_xcb_connection_t* my_xcb_connects[NXCB] = {0}; +static x64_xcb_connection_t x64_xcb_connects[NXCB] = {0}; void* align_xcb_connection(void* src) { |