Defer Mechanism for {C} - Inria - Institut national de recherche en sciences et technologies du numérique Access content directly
Books Year : 2020

Defer Mechanism for {C}

Abstract

The defer mechanism can restore a previously known property or invariant that is altered during the processing of a code block. The defer mechanism is useful for paired operations, where one operation is performed at the start of a code block and the paired operation is performed before exiting the block. Because blocks can be exited using a variety of mechanisms, operations are frequently paired incorrectly. The defer mechanism in C is intended to help ensure the proper pairing of these operations. This pattern is common in resource management, synchronization, and outputting balanced strings (e.g., parenthesis or HTML). A separable feature of the defer mechanism is a panic/recover mechanism that allows error handling at a distance.
No file

Dates and versions

hal-02953399 , version 1 (30-09-2020)

Identifiers

  • HAL Id : hal-02953399 , version 1

Cite

Aaron Ballman, Alex Gilding, Jens Gustedt, Tom Scogland, Robert C. Seacord, et al.. Defer Mechanism for {C}. ISO TC1/SC22/WG14, pp.57, 2020. ⟨hal-02953399⟩
72 View
0 Download

Share

Gmail Facebook X LinkedIn More