Module: xenomai-forge
Branch: next
Commit: 8f50d29549b89d57e2fcd136d7c0ec3db38b9833
URL:    
http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=8f50d29549b89d57e2fcd136d7c0ec3db38b9833

Author: Philippe Gerum <r...@xenomai.org>
Date:   Wed Feb 19 16:32:12 2014 +0100

cobalt/registry: drop useless special handling of XNOBJECT_SELF

---

 include/cobalt/kernel/registry.h |    2 --
 kernel/cobalt/registry.c         |    9 ++-------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/include/cobalt/kernel/registry.h b/include/cobalt/kernel/registry.h
index e3763c8..ad1b84a 100644
--- a/include/cobalt/kernel/registry.h
+++ b/include/cobalt/kernel/registry.h
@@ -28,8 +28,6 @@
 #include <cobalt/kernel/synch.h>
 #include <cobalt/kernel/vfile.h>
 
-#define XNOBJECT_SELF  XN_NO_HANDLE
-
 struct xnpnode;
 
 struct xnobject {
diff --git a/kernel/cobalt/registry.c b/kernel/cobalt/registry.c
index 02b0cc3..5d8bcf7 100644
--- a/kernel/cobalt/registry.c
+++ b/kernel/cobalt/registry.c
@@ -919,21 +919,16 @@ EXPORT_SYMBOL_GPL(xnregistry_lookup);
  * This service retrieves an object from its handle into the registry
  * and returns the memory address of its descriptor.
  *
- * @param handle The generic handle of the object to fetch. If
- * XNOBJECT_SELF is passed, the object is the calling Xenomai thread.
+ * @param handle The generic handle of the object to fetch.
  *
  * @return The memory address of the object's descriptor is returned
  * on success. Otherwise, NULL is returned if @a handle does not
- * reference a registered object, or if @a handle is equal to
- * XNOBJECT_SELF but the current context is not a real-time thread.
+ * reference a registered object.
  *
  * @remark Tags: isr-allowed.
  */
 void *xnregistry_fetch(xnhandle_t handle)
 {
-       if (handle == XNOBJECT_SELF)
-               return xnsched_primary_p() ? xnsched_current_thread() : NULL;
-
        return xnregistry_lookup(handle, NULL);
 }
 EXPORT_SYMBOL_GPL(xnregistry_fetch);


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to