{
{  This procedure sets the specified entry_assignment character to free.
{

  PROCEDURE [INLINE] dfp$free_entry_assignment
    (    entry_assignment: integer;
     VAR queue_assignment_string {input, output} : string ( * <=  dfc$queue_assignment_strng_size));

    CONST
      swap_successful = 0;

    VAR
      actual_word: string (8),
      found_word: string (8),
      found_word_starting_char: integer,
      p_test: ^string (8),
      result: 0 .. 2,
      swap_in_word: string (8),
      word_index: integer;

    found_word_starting_char := ((entry_assignment - 1) DIV 8) * 8 + 1;
    word_index := (entry_assignment MOD 8);
    IF word_index = 0 THEN
      word_index := 8;
    IFEND;
    { p_test required due to cybil bug.
    #SPOIL (queue_assignment_string);
    p_test := ^queue_assignment_string (found_word_starting_char, 8);

  /clear_entry/
    REPEAT
      #SPOIL (p_test^);
      osp$fetch_locked_string (p_test^, found_word);
      swap_in_word := found_word;
      swap_in_word (word_index) := dfc$free_entry_char;
      #SPOIL (p_test^);
      #COMPARE_SWAP (p_test^, found_word, swap_in_word, actual_word, result);
      #SPOIL (p_test^);
    UNTIL result = swap_successful;
  PROCEND dfp$free_entry_assignment;
?? PUSH (LISTEXT := ON) ??
*copyc dft$entry_type
*copyc dft$cpu_queue
*copyc osp$fetch_locked_string
?? POP ??

