Hi,
On 10/09/14 19:52, Iván Matellanes wrote:
+/*********************************************************************
_fflush_nolock (MSVCRT.@)
- */
+int CDECL MSVCRT__fflush_nolock(MSVCRT_FILE* file) +{
- if(!file) {
msvcrt_flush_all_buffers(MSVCRT__IOWRT);
There's one more thing that looks strange here. msvcrt_flush_all_buffers calls MSVCRT_fflush internally. That causes some streams to get locked and unlocked. Could you please add a test that checks how native behaves here? I'm not sure if we should lock any FILE's in a _nolock function variant.
Thanks, Piotr
On 10/10/14 10:41, Piotr Caban wrote:
Hi,
On 10/09/14 19:52, Iván Matellanes wrote:
+/*********************************************************************
_fflush_nolock (MSVCRT.@)
- */
+int CDECL MSVCRT__fflush_nolock(MSVCRT_FILE* file) +{
- if(!file) {
msvcrt_flush_all_buffers(MSVCRT__IOWRT);
There's one more thing that looks strange here. msvcrt_flush_all_buffers calls MSVCRT_fflush internally. That causes some streams to get locked and unlocked. Could you please add a test that checks how native behaves here? I'm not sure if we should lock any FILE's in a _nolock function variant.
Thanks, Piotr
Hi Piotr, thanks for your help. I was wondering how I could check the native behaviour in this case. Would you give me a hint?
Regards, Iván
Hi,
On 10/14/14 20:52, Iván Matellanes wrote:
I was wondering how I could check the native behaviour in this case. Would you give me a hint?
I've attached the test. It shows that _fflush_nolock(NULL) locks flushed files.
Cheers, Piotr