Transplantation of Clinux-2008r1-rc8 (bf561) to VDSP5 (MB): _nsig_words_is_unsupported_size
A function _nsig_words_is_unsupported_size is used in include/linux/signal.h, and its use is roughly as follows:
static inline int sigisemptyset(sigset_t *set)
{
extern void _NSIG_WORDS_is_unsupported_size(void);
switch (_NSIG_WORDS) {
case 4:
return (set->sig[3] | set->sig[2] |
set->sig[1] | set->sig[0]) == 0;
case 2:
return (set->sig[1] | set->sig[0]) == 0;
case 1:
return set->sig[0] == 0;
default:
_NSIG_WORDS_is_unsupported_size();
return 0;
}
}
In this case, the _nsig_words is defined as:
#define _NSIG 64
#define _NSIG_BPW 32
#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
That is, compile-time, so that when the optimization does not and generate code, there is no link error. However, debugging a compilation under VDSP results in a link error not found by the _nsig_words_is_unsupported_size symbol.
To do this, define it directly as:
inline void _nsig_words_is_unsupported_size () {Panic ("_nsig_words_is_unsupported_size ()");}