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 2017/02/28 22:51:53 UTC

[1/2] incubator-mynewt-core git commit: Expose os_dev_loookup()

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 10388edf3 -> b3be6f034


Expose os_dev_loookup()

This enables users who want to share a OS device during init to
access it using the device name.  This should not be called at
runtime.


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/9528e487
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/9528e487
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/9528e487

Branch: refs/heads/develop
Commit: 9528e487960f022e5541cfa4986cc01877ed133c
Parents: a42c0c1
Author: Sterling Hughes <st...@runtime.io>
Authored: Tue Feb 21 16:39:03 2017 -0800
Committer: Sterling Hughes <st...@runtime.io>
Committed: Tue Feb 21 16:39:03 2017 -0800

----------------------------------------------------------------------
 kernel/os/include/os/os_dev.h | 1 +
 kernel/os/src/os_dev.c        | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9528e487/kernel/os/include/os/os_dev.h
----------------------------------------------------------------------
diff --git a/kernel/os/include/os/os_dev.h b/kernel/os/include/os/os_dev.h
index 5af06b2..ed65a08 100644
--- a/kernel/os/include/os/os_dev.h
+++ b/kernel/os/include/os/os_dev.h
@@ -108,6 +108,7 @@ os_dev_resume(struct os_dev *dev)
 
 int os_dev_create(struct os_dev *dev, char *name, uint8_t stage,
         uint8_t priority, os_dev_init_func_t od_init, void *arg);
+struct os_dev *os_dev_lookup(char *name);
 int os_dev_initialize_all(uint8_t stage);
 int os_dev_suspend_all(os_time_t, uint8_t);
 int os_dev_resume_all(void);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/9528e487/kernel/os/src/os_dev.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/os_dev.c b/kernel/os/src/os_dev.c
index 139fe13..07b1c54 100644
--- a/kernel/os/src/os_dev.c
+++ b/kernel/os/src/os_dev.c
@@ -232,13 +232,16 @@ err:
 }
 
 /**
- * Lookup a device by name, internal function only.
+ * Lookup a device by name.
+ *
+ * WARNING: This should be called before any locking on the device is done, or
+ * the device list itself is modified in any context.  There is no locking.
  *
  * @param name The name of the device to look up.
  *
  * @return A pointer to the device corresponding to name, or NULL if not found.
  */
-static struct os_dev *
+struct os_dev *
 os_dev_lookup(char *name)
 {
     struct os_dev *dev;


[2/2] incubator-mynewt-core git commit: This closes #183.

Posted by ma...@apache.org.
This closes #183.

Merge branch 'os_dev_lookup_export' of https://github.com/sterlinghughes/incubator-mynewt-core into develop


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/b3be6f03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/b3be6f03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/b3be6f03

Branch: refs/heads/develop
Commit: b3be6f034169efaa53511b9da0905c4bba014608
Parents: 10388ed 9528e48
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Tue Feb 28 14:51:01 2017 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Tue Feb 28 14:51:01 2017 -0800

----------------------------------------------------------------------
 kernel/os/include/os/os_dev.h | 1 +
 kernel/os/src/os_dev.c        | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------