erlang各种有用的函数包括一些有用nif封装,还有一些性能测试case。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

22 lines
502 B

#ifndef C_SRC_EPQUEUE_ITEM_H_
#define C_SRC_EPQUEUE_ITEM_H_
#include "erl_nif.h"
#include <stdint.h>
struct epqueue_data;
struct queue_item
{
int32_t heap_index;
uint64_t priority;
ErlNifBinary data;
};
void epqueue_item_update_pos(void* ax, int32_t pos);
bool epqueue_item_less(void* ax, void* bx);
queue_item* epqueue_item_new(const epqueue_data* data, const ErlNifBinary& bin, uint64_t priority);
void epqueue_item_free(ErlNifEnv* env, void* obj);
#endif // C_SRC_EPQUEUE_ITEM_H_