Module: xenomai-3 Branch: next Commit: 1c6195a48b9dce928a9665dc8e40885b9d935217 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=1c6195a48b9dce928a9665dc8e40885b9d935217
Author: Philippe Gerum <r...@xenomai.org> Date: Tue Mar 24 18:29:46 2015 +0100 psos/task: use name generator for anon tasks --- lib/psos/task.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/psos/task.c b/lib/psos/task.c index ea122c0..a8a53a7 100644 --- a/lib/psos/task.c +++ b/lib/psos/task.c @@ -45,7 +45,8 @@ union psos_wait_union { struct cluster psos_task_table; -static unsigned long anon_tids; +static DEFINE_NAME_GENERATOR(task_namegen, "task", + struct psos_task, name); static struct psos_task *find_psos_task(u_long tid, int *err_r) { @@ -297,7 +298,7 @@ u_long t_create(const char *name, u_long prio, } if (name == NULL || *name == '\0') - sprintf(task->name, "t%lu", ++anon_tids); + generate_name(task->name, name, &task_namegen); else { name = __psos_maybe_short_name(short_name, name); namecpy(task->name, name); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git