You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/09/23 20:05:08 UTC
incubator-mynewt-core git commit: os;
change task name to be const char *.
Repository: incubator-mynewt-core
Updated Branches:
refs/heads/develop 3a2e76721 -> a5e646a0f
os; change task name to be const char *.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/a5e646a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/a5e646a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/a5e646a0
Branch: refs/heads/develop
Commit: a5e646a0f1fdc792a9bac09f603bd464860f39fe
Parents: 3a2e767
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Fri Sep 23 13:04:45 2016 -0700
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Fri Sep 23 13:04:45 2016 -0700
----------------------------------------------------------------------
libs/os/include/os/os_task.h | 16 ++++++++--------
libs/os/src/os_task.c | 6 +++---
2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a5e646a0/libs/os/include/os/os_task.h
----------------------------------------------------------------------
diff --git a/libs/os/include/os/os_task.h b/libs/os/include/os/os_task.h
index b4a16b1..561583b 100644
--- a/libs/os/include/os/os_task.h
+++ b/libs/os/include/os/os_task.h
@@ -57,7 +57,7 @@ typedef void (*os_task_func_t)(void *);
struct os_task {
os_stack_t *t_stackptr;
os_stack_t *t_stacktop;
-
+
uint16_t t_stacksize;
uint16_t t_pad;
@@ -66,30 +66,30 @@ struct os_task {
uint8_t t_state;
uint8_t t_flags;
- char *t_name;
+ const char *t_name;
os_task_func_t t_func;
void *t_arg;
void *t_obj;
- struct os_sanity_check t_sanity_check;
+ struct os_sanity_check t_sanity_check;
os_time_t t_next_wakeup;
os_time_t t_run_time;
uint32_t t_ctx_sw_cnt;
-
+
/* Global list of all tasks, irrespective of run or sleep lists */
STAILQ_ENTRY(os_task) t_os_task_list;
- /* Used to chain task to either the run or sleep list */
+ /* Used to chain task to either the run or sleep list */
TAILQ_ENTRY(os_task) t_os_list;
/* Used to chain task to an object such as a semaphore or mutex */
SLIST_ENTRY(os_task) t_obj_list;
};
-int os_task_init(struct os_task *, char *, os_task_func_t, void *, uint8_t,
- os_time_t, os_stack_t *, uint16_t);
+int os_task_init(struct os_task *, const char *, os_task_func_t, void *,
+ uint8_t, os_time_t, os_stack_t *, uint16_t);
uint8_t os_task_count(void);
@@ -107,7 +107,7 @@ struct os_task_info {
char oti_name[OS_TASK_MAX_NAME_LEN];
};
-struct os_task *os_task_info_get_next(const struct os_task *,
+struct os_task *os_task_info_get_next(const struct os_task *,
struct os_task_info *);
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/a5e646a0/libs/os/src/os_task.c
----------------------------------------------------------------------
diff --git a/libs/os/src/os_task.c b/libs/os/src/os_task.c
index e48fdf9..9e2860b 100644
--- a/libs/os/src/os_task.c
+++ b/libs/os/src/os_task.c
@@ -84,9 +84,9 @@ os_task_count(void)
* @return 0 on success, non-zero on failure.
*/
int
-os_task_init(struct os_task *t, char *name, os_task_func_t func, void *arg,
- uint8_t prio, os_time_t sanity_itvl, os_stack_t *stack_bottom,
- uint16_t stack_size)
+os_task_init(struct os_task *t, const char *name, os_task_func_t func,
+ void *arg, uint8_t prio, os_time_t sanity_itvl,
+ os_stack_t *stack_bottom, uint16_t stack_size)
{
struct os_sanity_check *sc;
int rc;