diff options
Diffstat (limited to 'cmogstored.h')
-rw-r--r-- | cmogstored.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cmogstored.h b/cmogstored.h index ffea4b0..c3ebf80 100644 --- a/cmogstored.h +++ b/cmogstored.h @@ -97,8 +97,8 @@ enum mog_next { }; struct mog_ioq { - size_t cur; - size_t max; + unsigned cur; + unsigned max; pthread_mutex_t mtx; SIMPLEQ_HEAD(ioq_head, mog_fd) ioq_head; bool contended; @@ -156,10 +156,10 @@ struct mog_svc { int docroot_fd; const char *docroot; unsigned persist_client; - size_t nmogdev; - size_t user_set_aio_threads; /* only touched by main/notify thread */ - size_t user_req_aio_threads; /* protected by aio_threads_lock */ - size_t thr_per_dev; + unsigned nmogdev; + unsigned user_set_aio_threads; /* only touched by main/notify thread */ + unsigned user_req_aio_threads; /* protected by aio_threads_lock */ + unsigned thr_per_dev; /* private */ DIR *dir; @@ -232,8 +232,8 @@ struct mog_thread { struct mog_thrpool { pthread_mutex_t lock; - size_t n_threads; - size_t want_threads; + unsigned n_threads; + unsigned want_threads; struct mog_thread *threads; void *(*start_fn)(void *); void *start_arg; @@ -369,8 +369,8 @@ typedef int (*mog_scandev_cb)(const struct mog_dev *, struct mog_svc *); size_t mog_svc_each(Hash_processor processor, void *data); void mog_svc_upgrade_prepare(void); bool mog_svc_start_each(void *svc_ptr, void *have_mgmt_ptr); -void mog_svc_thrpool_rescale(struct mog_svc *, size_t ndev_new); -void mog_svc_aio_threads_enqueue(struct mog_svc *, size_t nr); +void mog_svc_thrpool_rescale(struct mog_svc *, unsigned ndev_new); +void mog_svc_aio_threads_enqueue(struct mog_svc *, unsigned nr); void mog_svc_aio_threads_handler(void); /* dev.c */ @@ -437,11 +437,11 @@ char *mog_canonpath_die(const char *path, enum canonicalize_mode_t canon_mode); /* thrpool.c */ void mog_thr_test_quit(void); bool mog_thr_prepare_quit(void) MOG_CHECK; -void mog_thrpool_start(struct mog_thrpool *, size_t n, +void mog_thrpool_start(struct mog_thrpool *, unsigned n, void *(*start_fn)(void *), void *arg); void mog_thrpool_quit(struct mog_thrpool *, struct mog_queue *); void mog_thrpool_process_queue(void); -void mog_thrpool_set_size(struct mog_thrpool *, size_t size); +void mog_thrpool_set_size(struct mog_thrpool *, unsigned size); /* mgmt.c */ void mog_mgmt_writev(struct mog_mgmt *, struct iovec *, int iovcnt); @@ -645,7 +645,7 @@ void mog_yield(void); /* ioq.c */ extern __thread struct mog_ioq *mog_ioq_current; -void mog_ioq_init(struct mog_ioq *, struct mog_svc *, size_t val); +void mog_ioq_init(struct mog_ioq *, struct mog_svc *, unsigned val); bool mog_ioq_ready(struct mog_ioq *, struct mog_fd *) MOG_CHECK; bool mog_ioq_contended(void) MOG_CHECK; void mog_ioq_next(struct mog_ioq *); |