Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : CPUCOLLE.H

 
Output of file : CPUCOLLE.H contained in archive : PCCAPP.ZIP
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Vincent F. Russo ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/*
* CPUCollection.h: class to handle a collection of CPUs. This is used mostly
* to get a pointer to the CPU object representing a
* processor (especially on a multiprocessor).
*
*/

#ifndef CPUCollection_h
#define CPUCollection_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif

#include "Assert.h"
#include "CPU_CONFIGURATION.h"
#include "PROCESSOR_ID.h"

class CPU; // forward reference to prevent circular dependencies.

/*
* Dont make it a subclass of object because it would make looking up the
* CPU pointers take an extra dereference to bypass the virtual function
* table. The way it is now, the array is the first thing in the class so
* a pointer to the class is also a pointer to the array.
*/
class CPUCollection {
protected:
CPU * cpus[ MAXPROCESSORS ]; /* for now some assembler code knows */
/* the offset to this. So leave it as */
/* the first thing in the class */

public:
CPUCollection();

void add( unsigned long who, CPU * cpuObj );
void remove( unsigned long who );

CPU * me();
CPU * cpu( unsigned long uniqueId );
};

inline void
CPUCollection::add( unsigned long who, CPU * cpuObj )
{
cpus[ who ] = cpuObj;
}

inline void
CPUCollection::remove( unsigned long who )
{
cpus[ who ] = 0;
}

inline CPU *
CPUCollection::me()
{
return( cpus[ PerMemoryProcessorID() ] );
}

inline CPU *
CPUCollection::cpu( unsigned long uniqueId )
{
Assert( uniqueId < MAXPROCESSORS );
return( cpus[ uniqueId ] );
}

extern CPUCollection OnlineCPUs;

/*
* For shared memory multiprocessor use a CPUCollection for thisCPU().
*/
inline CPU *
thisCPU()
{
return( OnlineCPUs.me() );
}

#endif /* CPUCollection_h */
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Systems Research Group ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/
/* This file was generated by Proxify++ version 0.1 */

#ifndef CPUCollection_h
#define CPUCollection_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif
#include "Assert.h"
#include "CPU_CONFIGURATION.h"
#include "PROCESSOR_ID.h"
class CPU;
class CPUCollection;
extern CPUCollection OnlineCPUs;
#endif CPUCollection_h


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : CPUCOLLE.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/