One way to make this work correctly would be to remove the logmask as a global variable and, instead, put the logic mask in the group structure or in the TCB structure. That would make logmask thread safe (in the second case). This would be the preferred solution. This solution would work. The other suggestions will not work and just implement more complex version of the broken code.Actually, putting the logmask in TLS (with the errno) would be better solution. In some configurations, at least, that would avoid a system call.
- enter/leave_critical_section() calls in the user ... Nakamura, Yuuichi (Sony)
- RE: enter/leave_critical_section() calls in ... Xiang Xiao
- Re: enter/leave_critical_section() calls... Gregory Nutt
- Re: enter/leave_critical_section() c... Gregory Nutt
- Re: enter/leave_critical_section... Gregory Nutt
- RE: enter/leave_critical_se... Xiang Xiao
- Re: enter/leave_critica... Nathan Hartman
- Re: enter/leave_critica... Gregory Nutt
- RE: enter/leave_cri... Xiang Xiao
- RE: enter/leave_cri... Nakamura, Yuuichi (Sony)
- RE: enter/leave_cri... spudaneco
- RE: enter/leave_cri... Xiang Xiao
- RE: enter/leave_critical_section() calls in ... Nakamura, Yuuichi (Sony)