Threadlib refactoring, phase 1
All constructs, save Mutexes, can carry names. (Mutexes will carry them once HMalloc doesn't require a Mutex.) All constructs are now opaque to the game logic. Some limited upcalls will be added in phase 2 so that the game logic can initialize some thread-local data in a backend-independent way. DEBUG_TRACK_SEM is gone. In its place are NAMED_SYNCHRO (which names synchronization constructs) and TRACK_CONTENTION (which reports when threads go to sleep because of synchronization constructs.) Again, Mutexes are immune. A lot of conditionally compiled code in the threadlib was collated, dramatically reducing the number of preprocessing directives. The exposed (threadlib.h) and backend (sdlthreads.h) APIs match one another more closely now, further reducing the level of preprocessor work required. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1255 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -59,7 +59,6 @@ CHOICE_debug_OPTION_debug_TITLE="Debugging information"
|
||||
CHOICE_debug_OPTION_debug_ACTION='debug_action'
|
||||
debug_action() {
|
||||
CFLAGS="$CFLAGS -g -O0 -W -Wall"
|
||||
CFLAGS="$CFLAGS -DDEBUG_TRACK_SEM" # enable semaphore deugging
|
||||
LDFLAGS="$LDFLAGS -O0"
|
||||
DEBUG=1
|
||||
}
|
||||
@@ -67,7 +66,6 @@ CHOICE_debug_OPTION_strictdebug_TITLE="Debug info + strict compile checks"
|
||||
CHOICE_debug_OPTION_strictdebug_ACTION='strictdebug_action'
|
||||
strictdebug_action() {
|
||||
CFLAGS="$CFLAGS -O1" # This is needed for -Wunitialized
|
||||
CFLAGS="$CFLAGS -DDEBUG_TRACK_SEM" # enable semaphore debugging
|
||||
CFLAGS="$CFLAGS -W -Wall \
|
||||
-Wbad-function-cast -Wcast-qual -Wmissing-prototypes \
|
||||
-Wstrict-prototypes -Wmissing-declarations \
|
||||
|
||||
Reference in New Issue
Block a user