Sha256: 2b7df60b55ca5274da63b3185539a8ea1f467e6ce71b26a5aa1757ab88aab459

Contents?: true

Size: 918 Bytes

Versions: 3

Compression:

Stored size: 918 Bytes

Contents

#ifndef RUNQUEUE_H
#define RUNQUEUE_H

#include "polyphony.h"
#include "runqueue_ring_buffer.h"

typedef struct runqueue {
  runqueue_ring_buffer entries;
  unsigned int high_watermark;
  unsigned int switch_count;
} runqueue_t;

void runqueue_initialize(runqueue_t *runqueue);
void runqueue_finalize(runqueue_t *runqueue);
void runqueue_mark(runqueue_t *runqueue);

void runqueue_push(runqueue_t *runqueue, VALUE fiber, VALUE value, int reschedule);
void runqueue_unshift(runqueue_t *runqueue, VALUE fiber, VALUE value, int reschedule);
runqueue_entry runqueue_shift(runqueue_t *runqueue);
void runqueue_delete(runqueue_t *runqueue, VALUE fiber);
int runqueue_index_of(runqueue_t *runqueue, VALUE fiber);
void runqueue_clear(runqueue_t *runqueue);
long runqueue_len(runqueue_t *runqueue);
int runqueue_empty_p(runqueue_t *runqueue);
int runqueue_should_poll_nonblocking(runqueue_t *runqueue);

#endif /* RUNQUEUE_H */

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
polyphony-0.60 ext/polyphony/runqueue.h
polyphony-0.59.1 ext/polyphony/runqueue.h
polyphony-0.59 ext/polyphony/runqueue.h