Uclinux-2008r1-rc8 (bf561) to VDSP5 transplantation (in): WARN ()

Source: Internet
Author: User

Many of the functions in the Uclinux kernel are not invoked at the outset, but only as a function pointer, in order to avoid excessive link errors from the outset, a macro is defined in Config.h:

#ifndef __ASSEMBLY__
#include <ccblkfn.h>
#include <stdio.h>
#endif

#define WARN()
do {fprintf(stderr, "code omited: %d @ %s/n", __LINE__, __FILE__); while(1) idle();} while(0)

When a link error occurs, the function body is first identified, followed by warn (), as follows:

static void
default_handler(int var_segment, struct pt_regs *regp)
{
//   set_personality(0);
//
//   if (current_thread_info()->exec_domain->handler != default_handler)
//       current_thread_info()->exec_domain->handler(var_segment, regp);
//   else
//       send_sig(SIGSEGV, current, 1);
WARN();
}

So, when you run to this function, you'll output a hint and stop, and we'll remove the comment from the function body, hehe ...

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.