File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,11 +119,24 @@ copying of data.
119119
120120 *flags * (0 by default) takes :ref: `bitwise ORed <bitwise >` flags together.
121121
122- * :data: `!os.SHM_RENAME_EXCHANGE ` will let
123- an exchange with *newname * will be processed instead.
124- * :data: `!os.SHM_RENAME_NOREPLACE ` will raise
125- an error will be triggered if *newname * already exists.
122+ .. availability :: FreeBSD >= 13.0
126123
124+ .. versionadded :: next
125+
126+ .. data :: SHM_RENAME_EXCHANGE
127+ SHM_RENAME_NOREPLACE
128+
129+ Parameters to the :func: `rename ` function.
130+
131+ :const: `SHM_RENAME_EXCHANGE `
132+ Atomically exchange the SharedMemory to the *newname *.
133+
134+ :const: `SHM_RENAME_NOREPLACE `
135+ Raise an error if *newname * exists, rather than unlinking it.
136+
137+ .. availability :: FreeBSD >= 13.0
138+
139+ .. versionadded :: next
127140
128141 .. attribute :: buf
129142
Original file line number Diff line number Diff line change @@ -255,6 +255,9 @@ def unlink(self):
255255 resource_tracker .unregister (self ._name , "shared_memory" )
256256
257257 if _USE_POSIX and hasattr (_posixshmem , "shm_rename" ):
258+ from _posixshmem import SHM_RENAME_EXCHANGE
259+ from _posixshmem import SHM_RENAME_NOREPLACE
260+
258261 def rename (self , newname , flags = 0 ):
259262 """Renames a shared memory block.
260263
You can’t perform that action at this time.
0 commit comments