History log of /freebsd/lib/libc/gen/sem_new.c (Results 1 – 25 of 68)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/14.0.0
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix

show more ...


Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0, release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0
# d915a14e 25-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
p

libc: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

show more ...


Revision tags: release/10.4.0, release/11.1.0
# be27b311 04-May-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r317503 through r317807.


# f7a6f6a2 30-Apr-2017 Konstantin Belousov <kib@FreeBSD.org>

Make semaphore names list mutex non-recursive.

The mutex is used in sem_open() and sem_close(), which cannot
recurse. The atfork handlers cannot collide with the open and close
code.

Reviewed by: v

Make semaphore names list mutex non-recursive.

The mutex is used in sem_open() and sem_close(), which cannot
recurse. The atfork handlers cannot collide with the open and close
code.

Reviewed by: vangyzen
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D10545

show more ...


# e6a183a4 30-Apr-2017 Konstantin Belousov <kib@FreeBSD.org>

Restructure normal (non-error) control flow in sem_close().

Do not retest for the found semaphore after the loop to look it up.
Instead, handle both cases of last and non-last close simultaneously,

Restructure normal (non-error) control flow in sem_close().

Do not retest for the found semaphore after the loop to look it up.
Instead, handle both cases of last and non-last close simultaneously,
which allows to consolidate the list unlock and successful return.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


# 3a137162 30-Apr-2017 Konstantin Belousov <kib@FreeBSD.org>

Style.
- Use ANSI C function definitions.
- Remove redundand cast.
- Minor style compliance tweaks.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


# d630701f 25-Feb-2017 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r314178 through r314269.


# b215ceaa 23-Feb-2017 Eric van Gyzen <vangyzen@FreeBSD.org>

Add sem_clockwait_np()

This function allows the caller to specify the reference clock
and choose between absolute and relative mode. In relative mode,
the remaining time can be returned.

The API i

Add sem_clockwait_np()

This function allows the caller to specify the reference clock
and choose between absolute and relative mode. In relative mode,
the remaining time can be returned.

The API is similar to clock_nanosleep(3). Thanks to Ed Schouten
for that suggestion.

While I'm here, reduce the sleep time in the semaphore "child"
test to greatly reduce its runtime. Also add a reasonable timeout.

Reviewed by: ed (userland)
MFC after: 2 weeks
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D9656

show more ...


Revision tags: release/11.0.1, release/11.0.0, release/10.3.0
# f9421853 25-Jan-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# d9b9dae1 22-Jan-2016 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r294169 through r294598.


# 009e81b1 22-Jan-2016 Bjoern A. Zeeb <bz@FreeBSD.org>

MFH @r294567


# afa04e41 22-Jan-2016 Jilles Tjoelker <jilles@FreeBSD.org>

sem: Don't free nameinfo that is still in list when open() fails.

This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process.

sem: Don't free nameinfo that is still in list when open() fails.

This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process. The struct
sem_nameinfo would be freed while still in sem_list and later calls to
sem_open() or sem_close() could access freed memory.

PR: 206396
MFC after: 5 days

show more ...


Revision tags: release/10.2.0
# 98e0ffae 27-May-2015 Simon J. Gerraty <sjg@FreeBSD.org>

Merge sync of head


# 9f3d45b6 08-Feb-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Merge from HEAD


# 7aeb836a 29-Jan-2015 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r277861 through r277895.


# 49ba8a68 28-Jan-2015 Jilles Tjoelker <jilles@FreeBSD.org>

sem_post(): Fix and document semaphore value overflow error.

The error code is per Austin Group issue #315.

I provided different wording for the manual page change.

Submitted by: pluknet
MFC after

sem_post(): Fix and document semaphore value overflow error.

The error code is per Austin Group issue #315.

I provided different wording for the manual page change.

Submitted by: pluknet
MFC after: 1 week

show more ...


# 8f0ea33f 13-Jan-2015 Glen Barber <gjb@FreeBSD.org>

Reintegrate head revisions r273096-r277147

Sponsored by: The FreeBSD Foundation


# 9268022b 19-Nov-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge from head@274682


Revision tags: release/10.1.0
# 5c9ef378 04-Nov-2014 Alexander V. Chernikov <melifaro@FreeBSD.org>

Sync to HEAD@r274095.


# 53e1ffbb 24-Oct-2014 John Baldwin <jhb@FreeBSD.org>

The current POSIX semaphore implementation stores the _has_waiters flag
in a separate word from the _count. This does not permit both items to
be updated atomically in a portable manner. As a resul

The current POSIX semaphore implementation stores the _has_waiters flag
in a separate word from the _count. This does not permit both items to
be updated atomically in a portable manner. As a result, sem_post()
must always perform a system call to safely clear _has_waiters.

This change removes the _has_waiters field and instead uses the high bit
of _count as the _has_waiters flag. A new umtx object type (_usem2) and
two new umtx operations are added (SEM_WAIT2 and SEM_WAKE2) to implement
these semantics. The older operations are still supported under the
COMPAT_FREEBSD9/10 options. The POSIX semaphore API in libc has
been updated to use the new implementation. Note that the new
implementation is not compatible with the previous implementation.
However, this only affects static binaries (which cannot be helped by
symbol versioning). Binaries using a dynamic libc will continue to work
fine. SEM_MAGIC has been bumped so that mismatched binaries will error
rather than corrupting a shared semaphore. In addition, a padding field
has been added to sem_t so that it remains the same size.

Differential Revision: https://reviews.freebsd.org/D961
Reported by: adrian
Reviewed by: kib, jilles (earlier version)
Sponsored by: Norse

show more ...


# ee7b0571 19-Aug-2014 Simon J. Gerraty <sjg@FreeBSD.org>

Merge head from 7/28


Revision tags: release/9.3.0
# 6cec9cad 03-Jun-2014 Peter Grehan <grehan@FreeBSD.org>

MFC @ r266724

An SVM update will follow this.


# 414fdaf0 21-May-2014 Alan Somers <asomers@FreeBSD.org>

IFC @266473


# ca5e4fe9 10-May-2014 Konstantin Belousov <kib@FreeBSD.org>

Invalidate the cache for the named posix semaphore when opened and
actual file storing the semaphore object is different from the file
created on the first open. Store the file st_dev and st_ino mem

Invalidate the cache for the named posix semaphore when opened and
actual file storing the semaphore object is different from the file
created on the first open. Store the file st_dev and st_ino members
of the struct stat in the semaphore structure on open, and compare
them with the attributes of the opened file to detect unlink and
re-creation.

This fixes an issue of sem_unlink(3) failing to flush the named entry
in the semaphore list for the current or remote process, making
sem_unlink(3) not correctly operating if the unlinked semaphore is
still opened.

Reported by: Joris Giovannangeli <joris@giovannangeli.fr>
PR: standards/189353
Reviewed by: jilles (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

show more ...


123