Transplantation of Uclinux-2008r1-rc8 (bf561) to VDSP5 (57)

Source: Internet
Author: User

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 ()");}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.