This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem of newlib running on the SMP platform.


Hi, everybody,

I have found a problem about newlib running on the SMP platform.
First I describe my design environment here.
1. SMP platform shares the same memory and used the same memory address.
2. We have our SMP operating system which provide multi-thread and locks.
3. In the simulation, I found that the two threads in two different
CPUs enter the same system call at the same time. For example, both
threads call the "printf" and the output is terrible.

I have read some mails of newlib before. People suggest use
_impure_ptr and _reent. For my situation should I
1. Use two different _reent for two CPUs?
2. Use a different _reent for each thread?
3. Use only one _reent in whole system and lock it to guarantee only
one thread is using system call at the same time.

I am waiting for the answers.

Best regards,
Hao Shen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]