Init_table_callback now takes ownership of passed in data (#80)

* temp commit

* Stuff

* Ownership is now taken by init table callback

* Fixed lint errors

* Fixed travis warnings

* Fixed spacing

* add .gitkeep

* fix global scheduler

* Whitespace.
This commit is contained in:
Wapaul1
2016-12-03 13:49:09 -08:00
committed by Robert Nishihara
parent 61755bc168
commit 9a513363f9
16 changed files with 40 additions and 43 deletions
+8
View File
@@ -305,6 +305,14 @@ task *alloc_task(task_spec *spec, scheduling_state state, node_id node) {
return result;
}
task *copy_task(task *other) {
int64_t size = task_size(other);
task *copy = malloc(size);
CHECK(copy != NULL);
memcpy(copy, other, size);
return copy;
}
task *alloc_nil_task(task_id task_id) {
task_spec *nil_spec = alloc_nil_task_spec(task_id);
task *nil_task = alloc_task(nil_spec, 0, NIL_ID);