processor-affinity-mask
(setf sys:processor-affinity-mask)

$Revision: 1.1.2.2 $

Function

Package: SYSTEM

Arguments: nil

The processor affinity in Windows is a number which specifies the number of processors (i.e. chips) that will be used by the running process. In Allegro CL 5.0.x, the best affinity is 1 and there are known problems with higher affinities. The startup code on Windows sets the affinity to 1.

This function is defined on Windows versions only. On Unix versions, the symbols exist but have no function definitions. It uses a MicroSoft routine which is documented as working on Windows 95/98/NT/2000.

On Windows, return the current process' processor affinity mask (a number). It does this by calling GetProcessorAffinityMask(), and an error is signaled if this routine returns an error (0).

(setf sys:processor-affinity-mask)

On 95/98, this function has no effect.

On NT/2000, the setf value is the new processor affinity mask--see the Microsoft documentation on SetProcessorAffinityMask(). Our startup code sets the mask to 1 (see the (internal) function start-lisp-execution defined in <Allegro directory>/src/aclstart.cl). An error is signalled if the call to SetProcessorAffinityMask() fails.

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.