?? RIGHT := 110 ??

  PROCEDURE [INLINE] nap$free_request_block
    (VAR request_block {INPUT, OUTPUT} : ^nat$request_block);

?? PUSH (LISTEXT := ON) ??

    VAR
      initial: nat$preallocated_rb_control,
      new: nat$preallocated_rb_control,
      actual: nat$preallocated_rb_control,
      cs_status: osc$cs_successful .. osc$cs_variable_locked,
      complete_request: ^nat$complete_request_block;

    IF request_block^.allocation_description.preallocated THEN
      initial.first_free_block := UPPERVALUE (nat$request_block_identifier);
      initial.sequence_number := 0;
      new := initial;
      REPEAT
        #COMPARE_SWAP (nav$preallocated_rb_control, initial, new, actual, cs_status);
      UNTIL (cs_status <> osc$cs_variable_locked);

      initial := actual;
      request_block^.allocation_description.next_block_identifier := initial.first_free_block;
      new.first_free_block := request_block^.allocation_description.block_identifier;
      new.sequence_number := initial.sequence_number;
      REPEAT
        #COMPARE_SWAP (nav$preallocated_rb_control, initial, new, actual, cs_status);
        CASE cs_status OF
        = osc$cs_successful =
          ;
        = osc$cs_failed =
          initial := actual;
          request_block^.allocation_description.next_block_identifier := initial.first_free_block;
          new.first_free_block := request_block^.allocation_description.block_identifier;
          new.sequence_number := initial.sequence_number;
        = osc$cs_variable_locked =
          ;
        CASEND;
      UNTIL (cs_status = osc$cs_successful);
    ELSE
      complete_request := request_block^.complete_request_block;
      FREE complete_request IN osv$mainframe_wired_cb_heap^;
    IFEND;
    request_block := NIL;

  PROCEND nap$free_request_block;

*copy nah$free_request_block
*copyc nat$preallocated_rb_control
*copyc nat$request_block
*copyc nav$preallocated_rb_control
*copyc ost$signature_lock
*copyc osv$mainframe_wired_cb_heap
*copyc i#real_memory_address
?? POP ??
