Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 649585db authored by Pavlin Radoslavov's avatar Pavlin Radoslavov Committed by Scott James Remnant
Browse files

GKI cleanup - Moved GKI_get_os_tick_count() to OSI

 * Renamed function GKI_get_os_tick_count() to time_get_os_boottime_ms()
   and moved it to the OSI module: to the new file osi/src/time.c .
   The corresponding header file is osi/include/time.h

 * Added unit tests for function time_get_os_boottime_ms() in file
   osi/test/time_test.cpp

 * Removed "osi/include" from the list of paths to search for include
   files. This is needed, because file name collision of "time.h"
   in osi/include and the system <time.h>

Change-Id: I934be0c8f392150a352947326546bcf8aa070f97
parent 7439e203
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -7,7 +7,6 @@ LOCAL_C_INCLUDES := \
	$(LOCAL_PATH)/ulinux \
	$(LOCAL_PATH)/../btcore/include \
	$(LOCAL_PATH)/../include \
	$(LOCAL_PATH)/../osi/include \
	$(LOCAL_PATH)/../stack/include \
	$(LOCAL_PATH)/../utils/include \
	$(LOCAL_PATH)/../ \
+0 −3
Original line number Diff line number Diff line
@@ -84,6 +84,3 @@ void *GKI_remove_from_queue (BUFFER_Q *, void *);
*/
void    GKI_enable(void);
void    GKI_disable(void);

/* os timer operation */
UINT32 GKI_get_os_tick_count(void);
+0 −6
Original line number Diff line number Diff line
@@ -60,12 +60,6 @@ EXPORT_SYMBOL const module_t gki_module = {
  }
};

UINT32 GKI_get_os_tick_count(void) {
  struct timespec timespec;
  clock_gettime(CLOCK_BOOTTIME, &timespec);
  return (timespec.tv_sec * 1000) + (timespec.tv_nsec / 1000000);
}

void GKI_enable(void) {
  pthread_mutex_unlock(&gki_cb.lock);
}
+0 −1
Original line number Diff line number Diff line
@@ -101,7 +101,6 @@ LOCAL_C_INCLUDES+= . \
                   $(LOCAL_PATH)/../include \
                   $(LOCAL_PATH)/../stack/include \
                   $(LOCAL_PATH)/../stack/btm \
                   $(LOCAL_PATH)/../osi/include \
                   $(LOCAL_PATH)/../udrv/include \
                   $(LOCAL_PATH)/../vnd/include \
                   $(LOCAL_PATH)/../utils/include \
+0 −1
Original line number Diff line number Diff line
@@ -106,7 +106,6 @@ static_library("bta") {
    "//include",
    "//stack/include",
    "//stack/btm",
    "//osi/include",
    "//udrv/include",
    "//utils/include",
    "//vnd/include",
Loading