{"size": 1254, "ext": "scrbl", "max_stars_repo_path": "pkgs/racket-doc/scribblings/foreign/global.scrbl", "max_stars_repo_name": "lkh01/racket", "max_stars_repo_stars_event_min_datetime": "2018-07-05T21:18:24.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-04T14:48:37.000Z", "max_issues_repo_path": "pkgs/racket-doc/scribblings/foreign/global.scrbl", "max_issues_repo_name": "lkh01/racket", "max_issues_repo_issues_event_min_datetime": "2017-05-10T07:33:20.000Z", "max_issues_repo_issues_event_max_datetime": "2018-07-19T15:49:46.000Z", "max_forks_repo_path": "pkgs/racket-doc/scribblings/foreign/global.scrbl", "max_forks_repo_name": "lkh01/racket", "max_forks_repo_forks_event_min_datetime": "2016-04-25T11:47:57.000Z", "max_forks_repo_forks_event_max_datetime": "2017-05-09T14:52:48.000Z"}
{"max_stars_count": 4, "max_issues_count": 9, "max_forks_count": 3, "avg_line_length": 32.1538461538, "max_line_length": 71, "alphanum_fraction": 0.716108453}
#lang scribble/doc
@(require "utils.rkt"
          (for-label ffi/unsafe/global))

@title[#:tag "unsafe-global"]{Process-Wide and Place-Wide Registration}

@defmodule[ffi/unsafe/global]{The
@racketmodname[ffi/unsafe/global] library provides a utility
registering information that is local to a place or
spans all places in the Racket process.}

@history[#:added "6.9.0.5"]

@defproc[(register-process-global [key bytes?]
                                  [val cpointer?])
         cpointer?]{

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

If @racket[val] is @racket[#f], the current mapping for @racket[key]
is reported.

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

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

@defproc[(get-place-table-global) hash?]{

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

@history[#:added "6.11.0.6"]}
