5.13 Process-Wide and Place-Wide Registration

► |  | The Racket Foreign Interface

1 | Overview
2 | Loading Foreign Libraries
3 | C Types
4 | Pointer Functions
5 | Derived Utilities
6 | Miscellaneous Support
7 | Unexported Primitive Functions
| Bibliography
| Index

▼ | 5 | Derived Utilities

5.1 | Safe Homogenous Vectors
5.2 | Safe C Vectors
5.3 | Tagged C Pointer Types
5.4 | Serializable C Struct Types
5.5 | Static Callout and Callback Cores
5.6 | Defining Bindings
5.7 | Allocation and Finalization
5.8 | Custodian Shutdown Registration
5.9 | Atomic Execution
5.10 | Speculatively Atomic Execution
5.11 | Thread Scheduling
5.12 | Ports
5.13 | Process-Wide and Place-Wide Registration
5.14 | Operating System Threads
5.15 | Garbage Collection Callbacks
5.16 | Objective-C FFI
5.17 | Cocoa Foundation
5.18 | COM (Common Object Model)
5.19 | File Security-Guard Checks
5.20 | Windows API Helpers
5.21 | Virtual Machine Primitives
5.22 | Declaring Foreign Libraries Needed at Run Time

On this page:

register-process-global
get-place-table

Racket
top contents ← prev up next →

### 5.13 Process-Wide and Place-Wide Registration🔗ℹ

(require ffi/unsafe/global) | package: base

The ffi/unsafe/global library provides a utility registering information that is local to a place or spans all places in the Racket process.

Added in version 6.9.0.5 of package base.

> procedure (register-process-global key val) → cpointer?
> key : bytes?
> val : cpointer?

Gets or sets a value in a process-global table (i.e., shared across multiple places, if any).

If val is #f, the current mapping for key is reported.

If val is not #f, and no value has been installed for key, then the value is installed and #f is returned. If a value has already been installed, then no new value is installed and the old value is returned. The given val must not refer to garbage-collected memory.

This function is intended for infrequent use with a small number of keys.

> procedure (get-place-table) → hash?

Returns a place-specific, mutable, eq?-based hash table. The result is always the same for a particular place.

Added in version 6.11.0.6 of package base.

top contents ← prev up next →