I've just hit the compile error described in this thread on the MSP430 forum: http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/389538
C:/ti/ccsv6/tools/compiler/ti-cgt-msp430_4.4.0/include/_lock.h", line 48: error #56-D: too many arguments in invocation of macro "_nop
It appears to be the result of a change to in intrinsics.h. Previously it declared:
void _nop(void);
Later versions changed that to:
void __no_operation(void); [...] #define _nop() __no_operation()
Also the _nop declaration in _lock.h was changed from:
_CODE_ACCESS void _nop();
to:
_CODE_ACCESS void _nop(void);
Now the preprocessor tries to treat "void" as a parameter to the _nop macro from intrinsics.h while preprocessing _lock.h, resulting in the error.
From looking at the source for _lock.h and _lock.c it appears that the use of the identifier _nop is accidental. The intention was to define a function that is used as a default implementation for the lock and unlock functions. The default (which does nothing) can be optionally overridden using _register_lock/_register_unlock. The implementation of an empty function _nop in _lock.c implies that this "_nop" doesn't relate in any way to the _nop defined by intrinsics.h. Also the macros SYSTEM_WIDE_LOCK_REGISTERED and SYSTEM_WIDE_UNLOCK_REGISTERED defined in _lock.h use the address of the _nop function defined in _lock.h as a sentinel value. These macros are used by _pthread.c to check at runtime whether the lock/unlock functions have been overridden.
My suggested fix for the compile error is to change all instances of _nop in _lock.h/.c to something that won't collide with the _nop from intrinsics.h, eg:
_CODE_ACCESS void _lock_nop_implementation(void);
Note that this fix requires the RTS libraries be rebuilt from source, so isn't intended for end-users.