Refactor state database (#22)

* make db_connect return the connection

* rename db_conn -> db_handle

* more renaming

* clang-format

* free the db_handle
This commit is contained in:
Philipp Moritz
2016-09-25 21:52:06 -07:00
committed by Robert Nishihara
parent 1e08629013
commit db8c0acc71
9 changed files with 67 additions and 69 deletions
+3 -3
View File
@@ -21,13 +21,13 @@ typedef unique_id node_id;
typedef void (*task_queue_callback)(task_iid *task_iid, task_spec *task);
/* Submit task to the global scheduler. */
void task_queue_submit_task(db_conn *db, task_iid task_iid, task_spec *task);
void task_queue_submit_task(db_handle *db, task_iid task_iid, task_spec *task);
/* Submit task to a local scheduler based on the decision made by the global
* scheduler. */
void task_queue_schedule_task(db_conn *db, task_iid task_iid, node_id node);
void task_queue_schedule_task(db_handle *db, task_iid task_iid, node_id node);
/* Subscribe to task queue. */
void task_queue_register_callback(db_conn *db, task_queue_callback callback);
void task_queue_register_callback(db_handle *db, task_queue_callback callback);
#endif