MuPDF 1.22.0 DocumentationChapter 2. Using MuPDF with C MuPDF Documentation, Release 1.21.2 (continued from previous page) void fail(const char *msg) { fprintf(stderr, "%s\n", msg); abort(); } // The data structure passed between structure described above and // renders the display list into the pixmap before exiting. void * renderer(void *data_) { struct thread_data *data = (struct thread_data *)data_; int pagenumber = data->pagenumber; that can be used to transfer some state, in this case a // pointer to the array of mutexes. void lock_mutex(void *user, int lock) { pthread_mutex_t *mutex = (pthread_mutex_t *) user; if (pthread_mutex_lock(&mutex[lock])0 码力 | 175 页 | 698.87 KB | 8 月前3
MuPDF 1.23.0 DocumentationChapter 2. Using MuPDF with C MuPDF Documentation, Release 1.23.0 (continued from previous page) void fail(const char *msg) { fprintf(stderr, "%s\n", msg); abort(); } // The data structure passed between structure described above and // renders the display list into the pixmap before exiting. void * renderer(void *data_) { struct thread_data *data = (struct thread_data *)data_; int pagenumber = data->pagenumber; that can be used to transfer some state, in this case a // pointer to the array of mutexes. void lock_mutex(void *user, int lock) { pthread_mutex_t *mutex = (pthread_mutex_t *) user; if (pthread_mutex_lock(&mutex[lock])0 码力 | 245 页 | 817.74 KB | 8 月前3
MuPDF 1.25.0 Documentation#include // A convenience function for dying abruptly on pthread errors. void fail(const char *msg) { fprintf(stderr, "%s\n", msg); abort(); } // The data structure passed between structure described above and // renders the display list into the pixmap before exiting. void * renderer(void *data_) { struct thread_data *data = (struct thread_data *)data_; int pagenumber = data->pagenumber; mutexes. void lock_mutex(void *user, int lock) { pthread_mutex_t *mutex = (pthread_mutex_t *) user; if (pthread_mutex_lock(&mutex[lock]) != 0) fail("pthread_mutex_lock()"); } void unlock_mutex(void *user 0 码力 | 259 页 | 1.11 MB | 8 月前3
MuPDF 1.24.0 Documentation#include // A convenience function for dying abruptly on pthread errors. void fail(const char *msg) { fprintf(stderr, "%s\n", msg); abort(); } // The data structure passed between structure described above and // renders the display list into the pixmap before exiting. void * renderer(void *data_) { struct thread_data *data = (struct thread_data *)data_; int pagenumber = data->pagenumber; mutexes. void lock_mutex(void *user, int lock) { pthread_mutex_t *mutex = (pthread_mutex_t *) user; if (pthread_mutex_lock(&mutex[lock]) != 0) fail("pthread_mutex_lock()"); } void unlock_mutex(void *user 0 码力 | 249 页 | 830.15 KB | 8 月前3
共 4 条
- 1













