mirror of https://github.com/ARMmbed/mbed-os.git
unittests: fix windows build
- set equeue platform to posix for MINGW - enable PRIx formatting globally - remove redundant Semaphore implementationpull/12287/head
parent
e8eed6ecd5
commit
a2e5a34df6
|
@ -19,6 +19,13 @@ endmacro()
|
||||||
|
|
||||||
use_cxx14()
|
use_cxx14()
|
||||||
|
|
||||||
|
|
||||||
|
if (MINGW)
|
||||||
|
# enable PRIx formatting globally
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_FORMAT_MACROS")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_FORMAT_MACROS")
|
||||||
|
endif (MINGW)
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# GTEST
|
# GTEST
|
||||||
####################
|
####################
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
namespace rtos {
|
namespace rtos {
|
||||||
class Semaphore {
|
class Semaphore {
|
||||||
public:
|
public:
|
||||||
Semaphore(int32_t count = 0) {};
|
Semaphore(int32_t count = 0);
|
||||||
Semaphore(int32_t count, uint16_t max_count) {};
|
Semaphore(int32_t count, uint16_t max_count);
|
||||||
void acquire() {};
|
void acquire();
|
||||||
bool try_acquire() { return false; };
|
bool try_acquire();
|
||||||
bool try_acquire_for(uint32_t millisec) { return false; };
|
bool try_acquire_for(uint32_t millisec);
|
||||||
bool try_acquire_until(uint64_t millisec) { return false; };
|
bool try_acquire_until(uint64_t millisec);
|
||||||
osStatus release(void) {return 0;};
|
osStatus release(void);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ extern "C" {
|
||||||
// Try to infer a platform if none was manually selected
|
// Try to infer a platform if none was manually selected
|
||||||
#if !defined(EQUEUE_PLATFORM_POSIX) \
|
#if !defined(EQUEUE_PLATFORM_POSIX) \
|
||||||
&& !defined(EQUEUE_PLATFORM_MBED)
|
&& !defined(EQUEUE_PLATFORM_MBED)
|
||||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
|
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__MINGW32__) || defined(__MINGW64__)
|
||||||
#define EQUEUE_PLATFORM_POSIX
|
#define EQUEUE_PLATFORM_POSIX
|
||||||
#elif defined(__MBED__)
|
#elif defined(__MBED__)
|
||||||
#define EQUEUE_PLATFORM_MBED
|
#define EQUEUE_PLATFORM_MBED
|
||||||
|
|
Loading…
Reference in New Issue