IOT-1867 Add reference count to OCInit and OCStop
authorWay Vadhanasin <wayvad@microsoft.com>
Sat, 4 Mar 2017 07:16:04 +0000 (23:16 -0800)
committerDan Mihai <Daniel.Mihai@microsoft.com>
Sat, 4 Mar 2017 18:02:58 +0000 (18:02 +0000)
commit5343a1b86221b54a5513dc68b055c00e53318cef
treee4ea529db60306bf5fe8ecac514394b8fbab2873
parent568aadcf098ba0270ce92941a81488ffa12a6041
IOT-1867 Add reference count to OCInit and OCStop

This change adds reference count to OCStack and synchronizes the two
C APIs.

The change also introduces ocatomic.h, which defines some useful
atomic utility functions.

Change-Id: I2ea4023ab1d1dfda882a0d289db6d8ffdac1bdc4
Signed-off-by: Way Vadhanasin <wayvad@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17625
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>
resource/c_common/SConscript
resource/c_common/ocatomic/include/ocatomic.h [new file with mode: 0644]
resource/c_common/ocatomic/src/arduino/ocatomic.c [new file with mode: 0644]
resource/c_common/ocatomic/src/others/ocatomic.c [new file with mode: 0644]
resource/c_common/ocatomic/src/windows/ocatomic.c [new file with mode: 0644]
resource/csdk/stack/SConscript
resource/csdk/stack/src/ocstack.c
resource/csdk/stack/test/stacktests.cpp