summaryrefslogtreecommitdiff
path: root/core/host/host_task.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/host/host_task.h')
-rw-r--r--core/host/host_task.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/host/host_task.h b/core/host/host_task.h
new file mode 100644
index 0000000000..e4e0712ea2
--- /dev/null
+++ b/core/host/host_task.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/* Emulator task scheduling module */
+
+#ifndef __CROS_EC_HOST_TASK_H
+#define __CROS_EC_HOST_TASK_H
+
+#include <pthread.h>
+
+#include "task.h"
+
+/**
+ * Returns the thread corresponding to the task.
+ */
+pthread_t task_get_thread(task_id_t tskid);
+
+/**
+ * Returns the ID of the active task, regardless of current thread
+ * context.
+ */
+task_id_t task_get_running(void);
+
+#endif /* __CROS_EC_HOST_TASK_H */