• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "android-base/logging.h"
2 #include "gki.h"
3 #include "gki_int.h"
4 
5 tGKI_CB gki_cb;
6 
GKI_os_malloc(uint32_t size)7 void* GKI_os_malloc(uint32_t size) { return malloc(size); }
8 
GKI_os_free(void * p)9 void GKI_os_free(void* p) {
10   if (p) {
11     free(p);
12   }
13 }
14 
GKI_exception(uint16_t,std::string s)15 void GKI_exception(uint16_t, std::string s) { LOG(ERROR) << s; }
16 
17 // We fuzz in a single thread so locks and scheduling are not implemented
18 
GKI_disable(void)19 void GKI_disable(void) {}
GKI_enable(void)20 void GKI_enable(void) {}
21 
GKI_exit_task(unsigned char)22 void GKI_exit_task(unsigned char) { CHECK(false); }
23 
GKI_get_taskid()24 uint8_t GKI_get_taskid() { return NFC_TASK; }
GKI_get_os_tick_count()25 uint32_t GKI_get_os_tick_count() { return 0; }
26 
GKI_sched_unlock()27 void GKI_sched_unlock() {}
GKI_sched_lock()28 void GKI_sched_lock() {}
29 
GKI_send_event(unsigned char,unsigned short)30 uint8_t GKI_send_event(unsigned char, unsigned short) { return 0; }
31 
GKI_shiftup(unsigned char *,unsigned char *,unsigned int)32 void GKI_shiftup(unsigned char*, unsigned char*, unsigned int) { CHECK(false); }
33 
GKI_wait(unsigned short,unsigned int)34 uint16_t GKI_wait(unsigned short, unsigned int) { abort(); }
35