Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(618)

Issue 18711004: libpthread: Remove unneeded NULL checks from semaphore functions (Closed)

Created:
7 years, 5 months ago by Mark Seaborn
Modified:
7 years, 5 months ago
Reviewers:
Roland McGrath
CC:
native-client-reviews_googlegroups.com
Visibility:
Public.

Description

libpthread: Remove unneeded NULL checks from semaphore functions Failing gracefully rather than crashing when passed a bogus sem_t value is arguably an anti-feature, because it can mask mistakes in programs that don't check return values. glibc's semaphore implementation doesn't have these NULL checks. POSIX doesn't require NULL checks here. Remove tests that check for this error handling. Also remove commented-out test code for checking interruption of sem_wait() by an async signal. NaCl is not likely to have interruptible syscalls any time soon. BUG=https://code.google.com/p/nativeclient/issues/detail?id=715 TEST=run_semaphore_tests Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=11753

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -122 lines) Patch
M src/untrusted/pthread/nc_semaphore.c View 4 chunks +0 lines, -18 lines 0 comments Download
M tests/syscalls/semaphore_tests.cc View 4 chunks +7 lines, -104 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mark Seaborn
7 years, 5 months ago (2013-07-12 21:39:54 UTC) #1
Roland McGrath
lgtm
7 years, 5 months ago (2013-07-12 22:35:28 UTC) #2
Mark Seaborn
7 years, 5 months ago (2013-07-13 01:10:23 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 manually as r11753 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698