X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6330fa8d1410fba5e1560eeaeddf1a7382eaa369..31cb418c23b5fc1ab337e073e4113c873252a2a7:/include/msg/msg.h diff --git a/include/msg/msg.h b/include/msg/msg.h index 891eb33f9a..2ab76ca341 100644 --- a/include/msg/msg.h +++ b/include/msg/msg.h @@ -75,6 +75,7 @@ XBT_PUBLIC(size_t) MSG_file_read(void* ptr, size_t size, size_t nmemb, msg_file_ XBT_PUBLIC(size_t) MSG_file_write(const void* ptr, size_t size, size_t nmemb, msg_file_t stream); XBT_PUBLIC(msg_file_t) MSG_file_open(const char* mount, const char* path, const char* mode); XBT_PUBLIC(int) MSG_file_close(msg_file_t fp); +XBT_PUBLIC(size_t) MSG_file_get_size(msg_file_t fd); XBT_PUBLIC(int) MSG_file_unlink(msg_file_t fd); XBT_PUBLIC(xbt_dict_t) MSG_file_ls(const char *mount, const char *path); @@ -351,6 +352,19 @@ XBT_PUBLIC(msg_error_t) MSG_set_channel_number(int number); XBT_PUBLIC(int) MSG_get_channel_number(void); #endif +/** @brief Opaque type representing a semaphore + * @ingroup msg_synchro + * @hideinitializer + */ +typedef struct s_smx_sem *msg_sem_t; // Yeah that's a rename of the smx_sem_t which doesnt require smx_sem_t to be declared here +XBT_PUBLIC(msg_sem_t) MSG_sem_init(int initial_value); +XBT_PUBLIC(void) MSG_sem_acquire(msg_sem_t sem); +XBT_PUBLIC(msg_error_t) MSG_sem_acquire_timeout(msg_sem_t sem, double timeout); +XBT_PUBLIC(void) MSG_sem_release(msg_sem_t sem); +XBT_PUBLIC(void) MSG_sem_get_capacity(msg_sem_t sem); +XBT_PUBLIC(void) MSG_sem_destroy(msg_sem_t sem); +XBT_PUBLIC(int) MSG_sem_would_block(msg_sem_t sem); + /** @brief Opaque type describing a Virtual Machine. * @ingroup msg_VMs *