Browse Source

Renamed sem to semaphore.

Branimir Karadžić 8 years ago
parent
commit
4e2f6ff8d3
5 changed files with 28 additions and 3 deletions
  1. 0 0
      include/bx/semaphore.h
  2. 1 1
      include/bx/spscqueue.h
  3. 1 1
      include/bx/thread.h
  4. 25 0
      scripts/toolchain.lua
  5. 1 1
      src/semaphore.cpp

+ 0 - 0
include/bx/sem.h → include/bx/semaphore.h


+ 1 - 1
include/bx/spscqueue.h

@@ -9,7 +9,7 @@
 #include "bx.h"
 #include "cpu.h"
 #include "mutex.h"
-#include "sem.h"
+#include "semaphore.h"
 #include "uint32_t.h"
 
 #include <list>

+ 1 - 1
include/bx/thread.h

@@ -7,7 +7,7 @@
 #define BX_THREAD_H_HEADER_GUARD
 
 #include "bx.h"
-#include "sem.h"
+#include "semaphore.h"
 
 #if BX_CONFIG_SUPPORTS_THREADING
 

+ 25 - 0
scripts/toolchain.lua

@@ -730,6 +730,31 @@ function toolchain(_buildDir, _libDir)
 		buildoptions {
 			"-mfpmath=sse",
 		}
+--[[
+		defines { "BX_CRT_NONE" }
+
+		buildoptions {
+			"-nostdlib",
+			"-nodefaultlibs",
+			"-nostartfiles",
+			"-Wa,--noexecstack",
+			"-ffreestanding",
+
+			"-mpreferred-stack-boundary=4",
+			"-mstackrealign",
+		}
+
+		linkoptions {
+			"-nostdlib",
+			"-nodefaultlibs",
+			"-nostartfiles",
+			"-Wa,--noexecstack",
+			"-ffreestanding",
+
+			"-mpreferred-stack-boundary=4",
+			"-mstackrealign",
+		}
+--]]
 
 	configuration { "linux-gcc* or linux-clang*" }
 		buildoptions {

+ 1 - 1
src/sem.cpp → src/semaphore.cpp

@@ -3,7 +3,7 @@
  * License: https://github.com/bkaradzic/bx#license-bsd-2-clause
  */
 
-#include <bx/sem.h>
+#include <bx/semaphore.h>
 
 #if BX_CONFIG_SUPPORTS_THREADING