Module: xenomai-3 Branch: wip/dovetail Commit: a1cbf0ee6dc5dd08c96c13b79ddc49e85a25dc86 URL: http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=a1cbf0ee6dc5dd08c96c13b79ddc49e85a25dc86
Author: Philippe Gerum <r...@xenomai.org> Date: Sat Apr 30 15:06:02 2016 +0200 cobalt/registry: allow slash in keys without /proc node --- kernel/cobalt/registry.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/kernel/cobalt/registry.c b/kernel/cobalt/registry.c index 9d14863..ed8a37f 100644 --- a/kernel/cobalt/registry.c +++ b/kernel/cobalt/registry.c @@ -595,7 +595,8 @@ static inline int registry_wakeup_sleepers(const char *key) * that such key is stored into the registered object, it will *not* * be copied but only kept by reference in the registry. Pass an empty * or NULL string if the object shall only occupy a registry slot for - * handle-based lookups. + * handle-based lookups. The slash character is not accepted in @a key + * if @a pnode is non-NULL. * * @param objaddr An opaque pointer to the object to index by @a * key. @@ -613,8 +614,10 @@ static inline int registry_wakeup_sleepers(const char *key) * * @return 0 is returned upon success. Otherwise: * - * - -EINVAL is returned if @a objaddr is NULL, or if @a key is - * non-NULL and contains an invalid '/' character. + * - -EINVAL is returned if @a objaddr is NULL. + * + * - -EINVAL if @a pnode is non-NULL, and @a key points to a valid + * string containing a '/' character. * * - -ENOMEM is returned if the system fails to get enough dynamic * memory from the global real-time heap in order to register the @@ -631,7 +634,8 @@ int xnregistry_enter(const char *key, void *objaddr, spl_t s; int ret; - if (objaddr == NULL || (key != NULL && strchr(key, '/'))) + if (objaddr == NULL || + (pnode != NULL && key != NULL && strchr(key, '/'))) return -EINVAL; xnlock_get_irqsave(&nklock, s); _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org https://xenomai.org/mailman/listinfo/xenomai-git