21 lines
481 B
C
21 lines
481 B
C
|
|
#ifndef HAKMEM_TINY_SS_TARGET_H
|
||
|
|
#define HAKMEM_TINY_SS_TARGET_H
|
||
|
|
|
||
|
|
#include <stdatomic.h>
|
||
|
|
#include <stdint.h>
|
||
|
|
|
||
|
|
struct SuperSlab;
|
||
|
|
|
||
|
|
#ifndef TINY_NUM_CLASSES
|
||
|
|
#define TINY_NUM_CLASSES 8
|
||
|
|
#endif
|
||
|
|
|
||
|
|
// Per-class SuperSlab targeted drain queue (Treiber stack)
|
||
|
|
void ss_target_init(void);
|
||
|
|
void ss_target_enqueue(int class_idx, struct SuperSlab* ss);
|
||
|
|
struct SuperSlab* ss_target_pop(int class_idx);
|
||
|
|
void ss_target_requeue(int class_idx, struct SuperSlab* ss);
|
||
|
|
|
||
|
|
#endif // HAKMEM_TINY_SS_TARGET_H
|
||
|
|
|