number of processors. */
static inline void
-lock_node (struct merge_node *restrict node)
+lock_node (struct merge_node *node)
{
pthread_spin_lock (node->lock);
}
/* Unlock a merge tree NODE. */
static inline void
-unlock_node (struct merge_node *restrict node)
+unlock_node (struct merge_node *node)
{
pthread_spin_unlock (node->lock);
}
/* Destroy merge QUEUE. */
static inline void
-queue_destroy (struct merge_node_queue *restrict queue)
+queue_destroy (struct merge_node_queue *queue)
{
heap_free (queue->priority_queue);
pthread_cond_destroy (&queue->cond);
heap, RESERVE should be 2 * NTHREADS. */
static inline void
-queue_init (struct merge_node_queue *restrict queue, size_t reserve)
+queue_init (struct merge_node_queue *queue, size_t reserve)
{
queue->priority_queue = heap_alloc (compare_nodes, reserve);
pthread_mutex_init (&queue->mutex, NULL);
or does not need to lock NODE. */
static inline void
-queue_insert (struct merge_node_queue *restrict queue,
- struct merge_node *restrict node)
+queue_insert (struct merge_node_queue *queue, struct merge_node *node)
{
pthread_mutex_lock (&queue->mutex);
heap_insert (queue->priority_queue, node);
/* Pop NODE off priority QUEUE. Guarantee a non-null, spinlocked NODE. */
static inline struct merge_node *
-queue_pop (struct merge_node_queue *restrict queue)
+queue_pop (struct merge_node_queue *queue)
{
struct merge_node *node = NULL;
thus is only appropriate for internal sort. */
static inline void
-write_unique (struct line const *restrict line, FILE *tfp,
- char const *temp_output)
+write_unique (struct line const *line, FILE *tfp, char const *temp_output)
{
static struct line const *saved = NULL;
/* Insert NODE into QUEUE if it passes insertion checks. */
static inline void
-check_insert (struct merge_node *node, struct merge_node_queue *restrict queue)
+check_insert (struct merge_node *node, struct merge_node_queue *queue)
{
size_t lo_avail = node->lo - node->end_lo;
size_t hi_avail = node->hi - node->end_hi;
/* Update parent merge tree NODE. */
static inline void
-update_parent (struct merge_node *restrict node, size_t merged,
- struct merge_node_queue *restrict queue)
+update_parent (struct merge_node *node, size_t merged,
+ struct merge_node_queue *queue)
{
if (node->level > MERGE_ROOT)
{
some of those lines, until the MERGE_END node is popped. */
static void
-merge_loop (struct merge_node_queue *restrict queue,
+merge_loop (struct merge_node_queue *queue,
size_t total_lines, FILE *tfp, char const *temp_output)
{
while (1)
static void sortlines (struct line *restrict, struct line *restrict,
unsigned long int, size_t,
- struct merge_node *restrict, bool,
- struct merge_node_queue *restrict,
+ struct merge_node *, bool,
+ struct merge_node_queue *,
FILE *, char const *);
/* Thread arguments for sortlines_thread. */
struct line *dest;
unsigned long int nthreads;
size_t const total_lines;
- struct merge_node *const restrict parent;
+ struct merge_node *const parent;
bool lo_child;
- struct merge_node_queue *const restrict merge_queue;
+ struct merge_node_queue *const merge_queue;
FILE *tfp;
char const *output_temp;
};
static void
sortlines (struct line *restrict lines, struct line *restrict dest,
unsigned long int nthreads, size_t total_lines,
- struct merge_node *restrict parent, bool lo_child,
- struct merge_node_queue *restrict merge_queue,
+ struct merge_node *parent, bool lo_child,
+ struct merge_node_queue *merge_queue,
FILE *tfp, char const *temp_output)
{
/* Create merge tree NODE. */