Closed
Bug 552105
Opened 14 years ago
Closed 14 years ago
PR_OpenSemaphore does not set the error code properly on Windows CE
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: alexp, Assigned: wtc)
Details
Attachments
(1 file, 1 obsolete file)
1.27 KB,
patch
|
alexp
:
review+
|
Details | Diff | Splinter Review |
PR_OpenSemaphore called for a non-existing semaphore is expected to set the error code to PR_FILE_NOT_FOUND_ERROR, but instead it sets it to PR_UNKNOWN_ERROR on Windows CE.
Reporter | ||
Updated•14 years ago
|
Assignee: wtc → alexp
Status: NEW → ASSIGNED
Reporter | ||
Comment 1•14 years ago
|
||
Set the last error in our own implementation of the OpenSemaphore function for WinCE to the same value as in the native NT version of the function.
Attachment #432249 -
Flags: review?(bugmail)
Updated•14 years ago
|
Attachment #432249 -
Flags: review?(wtc)
Attachment #432249 -
Flags: review?(bugmail)
Attachment #432249 -
Flags: review+
Assignee | ||
Comment 2•14 years ago
|
||
Comment on attachment 432249 [details] [diff] [review] Fix r=wtc. What's the original error code set by CreateSemaphoreW in this case? >+ /* The semaphore did not exist, so we set the last error like OpenSemaphore on NT */ Nit: wrap this long line (it seems longer than 80 characters). Is there a better name for regular Windows than "NT"? >+ } > else Nit: This should be formatted as } else
Attachment #432249 -
Flags: review?(wtc) → review+
Reporter | ||
Comment 3•14 years ago
|
||
(In reply to comment #2) > What's the original error code set by CreateSemaphoreW > in this case? In this case CreateSemaphoreW just successfully creates a new semaphore, so the last error code is zero. We expect OpenSemaphore to fail though, so we just close the newly opened semaphore and set the error code to what is expected by other functions. > >+ /* The semaphore did not exist, so we set the last error like OpenSemaphore on NT */ > > Nit: wrap this long line (it seems longer than 80 characters). > Is there a better name for regular Windows than "NT"? There is a difference between Windows NT and 95 in this case. The function _PR_MD_OPEN_SEMAPHORE below has a comment about this. So the name "NT" is consistent and makes sense here. I will put "Windows NT" there though to add a bit more context.
Reporter | ||
Comment 4•14 years ago
|
||
Minor changes as per the code review.
Attachment #432249 -
Attachment is obsolete: true
Attachment #432615 -
Flags: review+
Reporter | ||
Updated•14 years ago
|
Assignee: alexp → wtc
Reporter | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•