/usr/include/xbt/queue.h is in libsimgrid-dev 3.11.1-9.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | /* A (synchronized) message queue. */
/* Popping an empty queue is blocking, as well as pushing a full one */
/* Copyright (c) 2007, 2009-2011, 2013-2014. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#ifndef _XBT_QUEUE_H
#define _XBT_QUEUE_H
#include "xbt/misc.h" /* SG_BEGIN_DECL */
/* #include "xbt/function_types.h" */
SG_BEGIN_DECL()
/** @addtogroup XBT_queue
* \brief Synchronized message exchanging queue.
*
* These is the classical producer/consumer synchronization scheme,
* which all concurrent programmer recode one day or another.
*
* The good thing of this implementation is that it works seamlessly
* in your universe. When using one of the classical simulation
* interface (such as MSG), it achieves the synchronization on top
* of the simulator. If you use instead the real life implementation
* comming with GRAS, it uses the synchronization of your OS
* (whatever could it be). The choice is done at link time.
*
* For performance concerns, the content of queue must be homogeneous,
* just like dynars (see the \ref XBT_dynar section). Actually, queues use a
* dynar to store the data, and add the synchronization on top of it.
*
* @{
*/
/** \brief Queue data type (opaque type) */
typedef struct s_xbt_queue_ *xbt_queue_t;
XBT_PUBLIC(xbt_queue_t) xbt_queue_new(int capacity,
unsigned long elm_size);
XBT_PUBLIC(void) xbt_queue_free(xbt_queue_t * queue);
XBT_PUBLIC(unsigned long) xbt_queue_length(const xbt_queue_t queue);
XBT_PUBLIC(void) xbt_queue_push(xbt_queue_t queue, const void *src);
XBT_PUBLIC(void) xbt_queue_pop(xbt_queue_t queue, void *const dst);
XBT_PUBLIC(void) xbt_queue_unshift(xbt_queue_t queue, const void *src);
XBT_PUBLIC(void) xbt_queue_shift(xbt_queue_t queue, void *const dst);
XBT_PUBLIC(void) xbt_queue_push_timed(xbt_queue_t queue, const void *src,
double delay);
XBT_PUBLIC(void) xbt_queue_unshift_timed(xbt_queue_t queue,
const void *src, double delay);
XBT_PUBLIC(void) xbt_queue_shift_timed(xbt_queue_t queue, void *const dst,
double delay);
XBT_PUBLIC(void) xbt_queue_pop_timed(xbt_queue_t queue, void *const dst,
double delay);
/** @} */
SG_END_DECL()
#endif /* _XBT_QUEUE_H */
|