oic; remove network event mutex as unused.

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

Branch: refs/heads/develop
Commit: 0ae187a38f07bf287d71af411f1346747d7bc6cd
Parents: 4b17e16
Author: Marko Kiiskila <[email protected]>
Authored: Fri Jan 13 12:32:28 2017 -0800
Committer: Marko Kiiskila <[email protected]>
Committed: Fri Jan 13 13:45:54 2017 -0800

----------------------------------------------------------------------
 net/oic/src/api/oc_main.c                  |  3 ---
 net/oic/src/port/mynewt/adaptor.c          | 25 ------------------
 net/oic/src/port/oc_network_events_mutex.h | 34 -------------------------
 3 files changed, 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0ae187a3/net/oic/src/api/oc_main.c
----------------------------------------------------------------------
diff --git a/net/oic/src/api/oc_main.c b/net/oic/src/api/oc_main.c
index f84c2cd..fd2bcea 100644
--- a/net/oic/src/api/oc_main.c
+++ b/net/oic/src/api/oc_main.c
@@ -20,8 +20,6 @@
 #include "port/oc_assert.h"
 #include "port/oc_clock.h"
 #include "port/oc_connectivity.h"
-#include "port/oc_connectivity.h"
-#include "port/oc_network_events_mutex.h"
 
 #include "oc_api.h"
 
@@ -54,7 +52,6 @@ oc_main_init(oc_handler_t *handler)
     oc_sec_dtls_init_context();
 #endif
 
-    oc_network_event_handler_mutex_init();
     ret = oc_connectivity_init();
     if (ret < 0) {
         goto err;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0ae187a3/net/oic/src/port/mynewt/adaptor.c
----------------------------------------------------------------------
diff --git a/net/oic/src/port/mynewt/adaptor.c 
b/net/oic/src/port/mynewt/adaptor.c
index 6f4134e..7b6525a 100644
--- a/net/oic/src/port/mynewt/adaptor.c
+++ b/net/oic/src/port/mynewt/adaptor.c
@@ -23,7 +23,6 @@
 #include <string.h>
 #include <log/log.h>
 #include "oic/oc_log.h"
-#include "port/oc_network_events_mutex.h"
 #include "port/oc_connectivity.h"
 #include "adaptor.h"
 
@@ -31,10 +30,6 @@ static struct os_eventq *oc_evq;
 
 struct log oc_log;
 
-/* not sure if these semaphores are necessary yet.  If we are running
- * all of this from one task, we may not need these */
-static struct os_mutex oc_net_mutex;
-
 struct os_eventq *
 oc_evq_get(void)
 {
@@ -49,26 +44,6 @@ oc_evq_set(struct os_eventq *evq)
 }
 
 void
-oc_network_event_handler_mutex_init(void)
-{
-    os_error_t rc;
-    rc = os_mutex_init(&oc_net_mutex);
-    assert(rc == 0);
-}
-
-void
-oc_network_event_handler_mutex_lock(void)
-{
-    os_mutex_pend(&oc_net_mutex, OS_TIMEOUT_NEVER);
-}
-
-void
-oc_network_event_handler_mutex_unlock(void)
-{
-    os_mutex_release(&oc_net_mutex);
-}
-
-void
 oc_send_buffer(struct os_mbuf *m)
 {
     struct oc_endpoint *oe;

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/0ae187a3/net/oic/src/port/oc_network_events_mutex.h
----------------------------------------------------------------------
diff --git a/net/oic/src/port/oc_network_events_mutex.h 
b/net/oic/src/port/oc_network_events_mutex.h
deleted file mode 100644
index 715be7f..0000000
--- a/net/oic/src/port/oc_network_events_mutex.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-// Copyright (c) 2016 Intel Corporation
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-*/
-
-#ifndef OC_NETWORK_EVENTS_MUTEX_H
-#define OC_NETWORK_EVENTS_MUTEX_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void oc_network_event_handler_mutex_init(void);
-
-void oc_network_event_handler_mutex_lock(void);
-
-void oc_network_event_handler_mutex_unlock(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* OC_NETWORK_EVENTS_MUTEX_H */

Reply via email to