This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

reentrant RTX51 Tiny

This is a question about reentrant functions in RTX51 Tiny System.
AS follows articles I found in http://www.keil.com/support/man/docs/tr51/tr51_reentrant.htm:
" You should disable Round-Robin Task Switching if you wish to invoke reentrant or non-reentrant function from more than one task or interrupt. "

If I want to invoke either reentrant functions or non-reentrant functions in RTX51 Tiny system, and they will be called in one more tasks, I should DISABLE Round-Robin Task Switching in CONF_TNY.A51.

Is it right?

Another question is that: addition, subtraction, multiplication, division in C51 library, are they all reentrant functions? Any I should be careful when I use them in one more tasks of RTX51 Tiny system?

Parents
  • Thank you guys for the useful information.
    Right now I know that if I want to make sure functions can be called by one more tasks simultaneouslly, I should declare it with reentrant keyword.
    Another test is that I create 2 functions as follows:

    void test1(void) {
      unsigned char tmp1, tmp2;
      tmp1 = 10;
      tmp2 = 8;
    }
    
    void test2(void) {
      unsigned char tmp1, tmp2;
      tmp1 = 10;
      tmp2 = 8;
      tmp2 = tmp1/tmp2;
    }
    


    I found that a WARNING message occur while building target with test1(), the message is MULTIPLE CALL TO SEGMENT. But I can build with test2() sucessfully.
    I know that whatever test1() or test2() all have overlay data group in *.M51. But I don't know what is the difference between test1() and test2().
    Could you explain why the warning message occur?

Reply
  • Thank you guys for the useful information.
    Right now I know that if I want to make sure functions can be called by one more tasks simultaneouslly, I should declare it with reentrant keyword.
    Another test is that I create 2 functions as follows:

    void test1(void) {
      unsigned char tmp1, tmp2;
      tmp1 = 10;
      tmp2 = 8;
    }
    
    void test2(void) {
      unsigned char tmp1, tmp2;
      tmp1 = 10;
      tmp2 = 8;
      tmp2 = tmp1/tmp2;
    }
    


    I found that a WARNING message occur while building target with test1(), the message is MULTIPLE CALL TO SEGMENT. But I can build with test2() sucessfully.
    I know that whatever test1() or test2() all have overlay data group in *.M51. But I don't know what is the difference between test1() and test2().
    Could you explain why the warning message occur?

Children