Use the symbol table in VxWorks to save your own stuff

Source: Internet
Author: User

Today, I turned to elder brother Chen's book, which mentioned the use of symbols table to store their own things, try a bit:
int i=0;
Char c[5]={97,98,99,100,0};
Char c1[5];

Myst=symtblcreate (200,true,memsyspartid);
for (i=0;i<10;i++)
{
C[1]+=1;
Symadd (myst,c,c,sym_global| SYM_DATA,100);
}
c[1]=98;
for (i=0;i<10;i++)
{
C[1]+=1;
Symfindbyname (Myst,c, (char * *) c1,null);
printf ("/n%s/n", &c1[8]);
}
Do not know why Symfindbyname retrieved the address of the first eight bytes is some do not know what the meaning of the data,
The Nineth start is the value

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.