<commit_before>/* This is free and unencumbered software released into the public domain. */

#ifndef _CPRIME_POSIX_H
#define _CPRIME_POSIX_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>  /* for ssize_t */
extern int posix_close(const int fd);
extern ssize_t posix_write(const int fd, const void* buf, const size_t count);
#endif /* HAVE_UNISTD_H */

#ifdef HAVE_POLL_H
#include <poll.h>    /* for pollfd, nfds_t */
extern int posix_poll(struct pollfd fds[], const nfds_t nfds, const int timeout);
#endif /* HAVE_POLL_H */

#ifdef HAVE_PTHREAD_H
#include <pthread.h> /* for pthread_t, pthread_attr_t */
extern int posix_pthread_create(pthread_t* restrict thread,
                                const pthread_attr_t* restrict attr,
                                void* (*start_routine)(void*), void* restrict arg);
#endif /* HAVE_PTHREAD_H */

#ifdef HAVE_MQUEUE_H
#include <mqueue.h> /* for mqd_t */
extern mqd_t posix_mq_send(mqd_t mqdes, const char* msg_ptr,
                           size_t msg_len, unsigned int msg_prio);
extern ssize_t posix_mq_receive(mqd_t mqdes, char* msg_ptr,
                                size_t msg_len, unsigned int* msg_prio);
#endif /* HAVE_MQUEUE_H */

#ifdef __cplusplus
}
#endif

#endif /* _CPRIME_POSIX_H */<commit_msg>Added the missing posix_mq_timedsend() and posix_mq_timedreceive() prototypes to <cprime/posix.h>.<commit_after>/* This is free and unencumbered software released into the public domain. */

#ifndef _CPRIME_POSIX_H
#define _CPRIME_POSIX_H

#ifdef __cplusplus
extern "C" {
#endif

#ifdef HAVE_UNISTD_H
#include <unistd.h>  /* for ssize_t */
extern int posix_close(const int fd);
extern ssize_t posix_write(const int fd, const void* buf, const size_t count);
#endif /* HAVE_UNISTD_H */

#ifdef HAVE_POLL_H
#include <poll.h>    /* for pollfd, nfds_t */
extern int posix_poll(struct pollfd fds[], const nfds_t nfds, const int timeout);
#endif /* HAVE_POLL_H */

#ifdef HAVE_PTHREAD_H
#include <pthread.h> /* for pthread_t, pthread_attr_t */
extern int posix_pthread_create(pthread_t* restrict thread,
  const pthread_attr_t* restrict attr,
  void* (*start_routine)(void*), void* restrict arg);
#endif /* HAVE_PTHREAD_H */

#ifdef HAVE_MQUEUE_H
#include <time.h>   /* for struct timespec */
#include <mqueue.h> /* for mqd_t */
extern mqd_t posix_mq_send(mqd_t mqdes,
  const char* msg_ptr,
  size_t msg_len,
  unsigned int msg_prio);
extern mqd_t posix_mq_timedsend(mqd_t mqdes,
  const char* msg_ptr,
  size_t msg_len,
  unsigned int msg_prio,
  const struct timespec* abs_timeout);
extern ssize_t posix_mq_receive(mqd_t mqdes,
  char* msg_ptr,
  size_t msg_len,
  unsigned int* msg_prio);
extern ssize_t posix_mq_timedreceive(mqd_t mqdes,
  char* msg_ptr,
  size_t msg_len,
  unsigned int* msg_prio,
  const struct timespec* abs_timeout);
#endif /* HAVE_MQUEUE_H */

#ifdef __cplusplus
}
#endif

#endif /* _CPRIME_POSIX_H */
{'fraction_non_alphanumeric': 0.10006854009595613, 'fraction_numerical': 0.0, 'mean_word_length': 4.103146853146853, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7165732', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1113, 'n_words': 292}