[Xenomai-git] Philippe Gerum : cobalt/posix/thread: drop .fp support flag
Module: xenomai-forge Branch: master Commit: 6cd3fe535e1b7a31f04d30aded489b5fab2fb125 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6cd3fe535e1b7a31f04d30aded489b5fab2fb125 Author: Philippe Gerum Date: Sat Jul 6 16:44:53 2013 +0200 cobalt/posix/thread: drop .fp support flag FPU support is always available to Cobalt threads which are user-space only. --- kernel/cobalt/posix/thread.c | 14 +++--- kernel/cobalt/posix/thread.h |1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c index 7ed80da..27641c1 100644 --- a/kernel/cobalt/posix/thread.c +++ b/kernel/cobalt/posix/thread.c @@ -45,7 +45,6 @@ static const pthread_attr_t default_thread_attr = { .sched_priority = 0 }, .name = NULL, - .fp = 1, .affinity = XNPOD_ALL_CPUS, }; @@ -345,9 +344,8 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) struct xnsched_class *sched_class; union xnsched_policy_param param; struct xnthread_init_attr iattr; - int prio, ret, pol, flags = 0; pthread_t thread, cur; - const char *name; + int prio, ret, pol; spl_t s; if (attr && attr->magic != COBALT_THREAD_ATTR_MAGIC) @@ -385,14 +383,9 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) prio = -prio; pol = SCHED_WEAK; } - name = thread->attr.name; - flags |= XNUSER; - if (thread->attr.fp) - flags |= XNFPU; - - iattr.name = name; - iattr.flags = flags; + iattr.name = thread->attr.name; + iattr.flags = XNUSER|XNFPU; iattr.personality = &cobalt_personality; /* @@ -834,7 +827,6 @@ int cobalt_thread_create(unsigned long tid, int policy, attr.policy = policy; attr.detachstate = PTHREAD_CREATE_DETACHED; attr.schedparam_ex = param; - attr.fp = 1; attr.name = p->comm; ret = pthread_create(&pthread, &attr); diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h index b4963e8..791f694 100644 --- a/kernel/cobalt/posix/thread.h +++ b/kernel/cobalt/posix/thread.h @@ -55,7 +55,6 @@ typedef struct cobalt_threadattr { /* Non portable */ struct sched_param_ex schedparam_ex; char *name; - int fp; cpumask_t affinity; } pthread_attr_t; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/posix/thread: drop .fp support flag
Module: xenomai-forge Branch: next Commit: 6cd3fe535e1b7a31f04d30aded489b5fab2fb125 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=6cd3fe535e1b7a31f04d30aded489b5fab2fb125 Author: Philippe Gerum Date: Sat Jul 6 16:44:53 2013 +0200 cobalt/posix/thread: drop .fp support flag FPU support is always available to Cobalt threads which are user-space only. --- kernel/cobalt/posix/thread.c | 14 +++--- kernel/cobalt/posix/thread.h |1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c index 7ed80da..27641c1 100644 --- a/kernel/cobalt/posix/thread.c +++ b/kernel/cobalt/posix/thread.c @@ -45,7 +45,6 @@ static const pthread_attr_t default_thread_attr = { .sched_priority = 0 }, .name = NULL, - .fp = 1, .affinity = XNPOD_ALL_CPUS, }; @@ -345,9 +344,8 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) struct xnsched_class *sched_class; union xnsched_policy_param param; struct xnthread_init_attr iattr; - int prio, ret, pol, flags = 0; pthread_t thread, cur; - const char *name; + int prio, ret, pol; spl_t s; if (attr && attr->magic != COBALT_THREAD_ATTR_MAGIC) @@ -385,14 +383,9 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) prio = -prio; pol = SCHED_WEAK; } - name = thread->attr.name; - flags |= XNUSER; - if (thread->attr.fp) - flags |= XNFPU; - - iattr.name = name; - iattr.flags = flags; + iattr.name = thread->attr.name; + iattr.flags = XNUSER|XNFPU; iattr.personality = &cobalt_personality; /* @@ -834,7 +827,6 @@ int cobalt_thread_create(unsigned long tid, int policy, attr.policy = policy; attr.detachstate = PTHREAD_CREATE_DETACHED; attr.schedparam_ex = param; - attr.fp = 1; attr.name = p->comm; ret = pthread_create(&pthread, &attr); diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h index b4963e8..791f694 100644 --- a/kernel/cobalt/posix/thread.h +++ b/kernel/cobalt/posix/thread.h @@ -55,7 +55,6 @@ typedef struct cobalt_threadattr { /* Non portable */ struct sched_param_ex schedparam_ex; char *name; - int fp; cpumask_t affinity; } pthread_attr_t; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git
[Xenomai-git] Philippe Gerum : cobalt/posix/thread: drop .fp support flag
Module: xenomai-forge Branch: next Commit: becce9f3ea307a363f9d563e808c5ed869ae6670 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=becce9f3ea307a363f9d563e808c5ed869ae6670 Author: Philippe Gerum Date: Sat Jul 6 16:44:53 2013 +0200 cobalt/posix/thread: drop .fp support flag FPU support is always available to Cobalt threads which are user-space only. --- kernel/cobalt/posix/thread.c | 14 +++--- kernel/cobalt/posix/thread.h |1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/kernel/cobalt/posix/thread.c b/kernel/cobalt/posix/thread.c index 7ed80da..27641c1 100644 --- a/kernel/cobalt/posix/thread.c +++ b/kernel/cobalt/posix/thread.c @@ -45,7 +45,6 @@ static const pthread_attr_t default_thread_attr = { .sched_priority = 0 }, .name = NULL, - .fp = 1, .affinity = XNPOD_ALL_CPUS, }; @@ -345,9 +344,8 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) struct xnsched_class *sched_class; union xnsched_policy_param param; struct xnthread_init_attr iattr; - int prio, ret, pol, flags = 0; pthread_t thread, cur; - const char *name; + int prio, ret, pol; spl_t s; if (attr && attr->magic != COBALT_THREAD_ATTR_MAGIC) @@ -385,14 +383,9 @@ static inline int pthread_create(pthread_t *tid, const pthread_attr_t *attr) prio = -prio; pol = SCHED_WEAK; } - name = thread->attr.name; - flags |= XNUSER; - if (thread->attr.fp) - flags |= XNFPU; - - iattr.name = name; - iattr.flags = flags; + iattr.name = thread->attr.name; + iattr.flags = XNUSER|XNFPU; iattr.personality = &cobalt_personality; /* @@ -834,7 +827,6 @@ int cobalt_thread_create(unsigned long tid, int policy, attr.policy = policy; attr.detachstate = PTHREAD_CREATE_DETACHED; attr.schedparam_ex = param; - attr.fp = 1; attr.name = p->comm; ret = pthread_create(&pthread, &attr); diff --git a/kernel/cobalt/posix/thread.h b/kernel/cobalt/posix/thread.h index b4963e8..791f694 100644 --- a/kernel/cobalt/posix/thread.h +++ b/kernel/cobalt/posix/thread.h @@ -55,7 +55,6 @@ typedef struct cobalt_threadattr { /* Non portable */ struct sched_param_ex schedparam_ex; char *name; - int fp; cpumask_t affinity; } pthread_attr_t; ___ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git