Some stuff from LISP NEWS about who-line variables.



[B] NEWIO HAS HAD FOR SOME TIME STATUS CALLS FOR MANIPULATING THE
    WHO-LINE; THESE WERE DESCRIBED PREVIOUSLY IN LISP ARCHIV.
    NOW A NEW STATUS CALL CONTROLS THE DISPLAY OF GC STATISTICS IN
    THE WHO-LINE.
	(STATUS GCWHO) RETURNS THE CURRENT GCWHO STATUS AS A FIXNUM.
	(SSTATUS GCWHO <N>) SETS THE STATUS TO THE FIXNUM <N>.
    RIGHT NOW ONLY THE 1 AND 2 BITS OF THE STATUS ARE SIGNIFICANT.
    1 MEANS THAT DURING A GC, THE WHO-LINE SHOULD BE ALTERED TO
    READ "GC:XXXXX" WHERE XXXXX IS THE REASON FOR THE GC.
    AT THE END OF THE GARBAGE COLLECTION THE WHO-LINE IS RESTORED.
    2 MEANS THAT AT THE END OF THE GC THE .WHO2 WORD SHOULD
    BE CLOBBERED WITH GC RUN TIME INFORMATION.  SPECIFICALLY,
    THE LEFT HALF GETS THE PERCENTAGE OF RUN TIME WHICH HAS BEEN
    SPENT IN GC, AND THE RIGHT HALF GETS THE GC RUN TIME IN FORTIETHS
    OF A SECOND.  IF THE FIRST TWO ARGUMENTS TO (SSTATUS WHO1 ...)
    ARE 52 OCTAL AND '%, THEN THESE STATISTICS WILL BE PRINTED
    IN THE FORM "NNN% HH:MM:DD.T", JUST LIKE THE STANDARD SYSTEM
    RUNTIME PERCENTAGE AND VALUE.  IN THIS WAY ONE CAN CONTINUOUSLY
    MONITOR GC RUN TIME STATISTICS.  THE 1 AND 2 BITS MAY BE USED
    TOGETHER (3) OR INDEPENDENTLY.  NOTE THAT WHILE USING THE 2 BIT
    THE .WHO3 VARIABLE IS STILL LEFT OVER FOR USE BY THE USER.
    THUS ONE MIGHT SAY:
	(SSTATUS WHO1 52 '% 166 0)
	(SSTATUS GCWHO 3)
	(SSTATUS WHO3 'QUUX)
    AND ONE WOULD NORMALLY SEE "43% 00:15:07.8 QUUX", BUT DURING
    A GC ONE WOULD SEE "GC:FIXNUM" OR WHATEVER.
    A NOTE FOR THOSE WHO USE SUSPEND:  IF THE SUSPENDED JOB IS DUMPED
    OUT AND LATER RELOADED, THE RUNTIME (MAINTAINED BY THE TIME-SHARING
    SYSTEM) WILL HAVE BEEN RESET, BUT NOT THE GCTIME, WHICH IS MAINTAINED
    BY LISP.  THEREFORE A ROUTINE WHICH DOES A SUSPEND SHOULD PERFORM
    (SSTATUS GCTIME 0) ON RETURN FROM THE SUSPEND IN ORDER TO MAKE
    THE WHO-LINE AND OTHER GC STATISTICS ACCURATE.

[E] (SSTATUS WHO1 A B C D) SETS THE .WHO1 USER VARIABLE TO
		<.BYTE 8 ? A ? B ? C ? D>
    IN MIDAS TERMINOLOGY.  A AND C MUST BE FIXNUMS; B AND D
    MUST BE FIXNUMS WITH ASCII VALUES, OR CHARACTER OBJECTS.
    (SSTATUS WHO2 X) AND (SSTATUS WHO3 X) SET THE .WHO2 AND
    .WHO3 USER VARIABLES.  X MAY BE A FIXNUM OR A SYMBOL;
    IN THE LATTER CASE THE FIRST SIX CHARACTERS ARE USED TO
    FORM A SIXBIT WORD.
    THE .WHON USER VARIABLES CAUSE INFORMATION TO BE DISPLAYED
    IN THE TERMINAL'S WHO-LINE.
    THE MEANING OF A, B, C, AND D IS AS FOLLOWS:
	VAR	BITS	MEANING
	A	200	IF 1, SUPPRESS ENTIRE WHO-LINE
		100	SUPPRESS SPACE BETWEEN HALVES OF .WHO2
		 70	MODE FOR PRINTING LEFT HALF OF .WHO2
			0	DO NOT PRINT
			1	DATE IN PACKED FORM:
				774000	YEAR MOD 100.
				  3600	MONTH (1=JANUARY)
				   174	DAY OF MONTH
			2	TIME IN FORTIETHS OF A SECOND,
				PRINTED AS HH:MM:SS.T
			3	TIME IN HALF-SECONDS,
				PRINTED AS HH:MM:SS
			4	OCTAL HALFWORD
			5	DECIMAL HALFWORD (NO . SUPPLIED)
			6	THREE SIXBIT CHARACTERS
			7	UNUSED
		  7	MODE FOR RIGHT HALF OF .WHO2
	B	177	IF NON-ZERO, PRINT BETWEEN HALVES OF
			.WHO2 AS AN ASCII CHARACTER
		200	IF 1, PRINT CHAR TWICE
	C	200	IF 1, SUPPRESS SPACE BETWEEN .WHO2
			PRINTOUT AND .WHO3 PRINTOUT
		OTHERWISE LIKE A, BUT FOR .WHO3.
	D	LIKE B, BUT FOR .WHO3.
    THAT IS, IF THE WHO-LINE IS PRINTED AT ALL, WHAT APPEARS
    AT THE END IS THE CHARACTERS:
		IIIIXX-JJJJ=KKKKYY+LLLL
    WHERE:
	IIII	IS THE RESULT OF PRINTING THE LEFT HALF
		OF .WHO2 AS SPECIFIED BY A'S 70 BITS.
	JJJJ	RIGHT HALF OF .WHO2, BY A'S 7 BITS.
	KKKK	LEFT HALF OF .WHO3, BY C'S 70 BITS.
	LLLL	RIGHT HALF OF .WHO3, BY C'S 7 BITS.
	XX	ZERO TO TWO CHARACTERS, SPECIFIED BY B.
	YY	ZERO TO TWO CHARACTERS, SPECIFIED BY D.
	-	SPACE, UNLESS A'S 100 BIT IS 1.
	=	SPACE, UNLESS C'S 200 BIT IS 1.
	+	SPACE, UNLESS C'S 100 BIT IS 1.
    EXAMPLE:
	(SSTATUS WHO1 166 0 144 '/!)
	(SSTATUS WHO2 'FOOBAR)
	(SSTATUS WHO3 (+ (LSH 1234 22) 3456))
    CAUSES "FOOBAR 1234!5678" TO APPEAR IN THE WHO-LINE.

    THE STATUS FORMS ARE AS FOLLOWS:
	(STATUS WHO1) RETURNS A LIST OF FOUR FIXNUMS.
	(STATUS WHO2) AND (STATUS WHO3) RETURN FIXNUMS.

