mirror of
https://github.com/wassname/ray.git
synced 2026-08-19 12:30:27 +08:00
task queue tests and extensions (#18)
* task queue tests and extensions * clean up test
This commit is contained in:
committed by
Robert Nishihara
parent
313241e303
commit
7a079547b0
@@ -10,6 +10,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "common.h"
|
||||
#include "utstring.h"
|
||||
|
||||
typedef unique_id function_id;
|
||||
typedef unique_id object_id;
|
||||
@@ -22,7 +23,7 @@ enum arg_type { ARG_BY_REF, ARG_BY_VAL };
|
||||
/* Construct and modify task specifications. */
|
||||
|
||||
/* Allocating and initializing a task. */
|
||||
task_spec *alloc_task_spec(function_id func_id,
|
||||
task_spec *alloc_task_spec(function_id function_id,
|
||||
int64_t num_args,
|
||||
int64_t num_returns,
|
||||
int64_t args_value_size);
|
||||
@@ -30,6 +31,9 @@ task_spec *alloc_task_spec(function_id func_id,
|
||||
/* Size of the task in bytes. */
|
||||
int64_t task_size(task_spec *spec);
|
||||
|
||||
/* Return the function ID of the task. */
|
||||
unique_id *task_function(task_spec *spec);
|
||||
|
||||
/* Getting the number of arguments and returns. */
|
||||
int64_t task_num_args(task_spec *spec);
|
||||
int64_t task_num_returns(task_spec *spec);
|
||||
@@ -58,4 +62,10 @@ void write_task(int fd, task_spec *spec);
|
||||
* responsibility to free the task after it has been used. */
|
||||
task_spec *read_task(int fd);
|
||||
|
||||
/* Print task as a humanly readable string. */
|
||||
void print_task(task_spec *spec, UT_string *output);
|
||||
|
||||
/* Parse task as printed by print_task. */
|
||||
task_spec *parse_task(char *task_string, int64_t task_length);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user