home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / mips / mipsOsBSD.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-18  |  1.9 KB  |  60 lines

  1. /*
  2.  * $XConsortium: mipsOsBSD.c,v 1.2 91/07/18 22:58:52 keith Exp $
  3.  *
  4.  * Copyright 1991 MIPS Computer Systems, Inc.
  5.  *
  6.  * Permission to use, copy, modify, distribute, and sell this software and its
  7.  * documentation for any purpose is hereby granted without fee, provided that
  8.  * the above copyright notice appear in all copies and that both that
  9.  * copyright notice and this permission notice appear in supporting
  10.  * documentation, and that the name of MIPS not be used in advertising or
  11.  * publicity pertaining to distribution of the software without specific,
  12.  * written prior permission.  MIPS makes no representations about the
  13.  * suitability of this software for any purpose.  It is provided "as is"
  14.  * without express or implied warranty.
  15.  *
  16.  * MIPS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
  17.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL MIPS
  18.  * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  19.  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  20.  * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 
  21.  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  22.  */
  23. #ident    "$Header: mipsOsBSD.c,v 1.2 91/07/18 22:58:52 keith Exp $"
  24.  
  25. /*
  26.  * OS support code which requires bsd43 include files
  27.  */
  28.  
  29. #include <bsd43/syscall.h>
  30. #include <bsd43/sysmips.h>
  31. #include <bsd43/mips/debug.h>
  32. #include <bsd43/mips/hwconf.h>
  33.  
  34. #include "mips.h"
  35.  
  36. #ifdef SYSV
  37. #define    hwconf(option,conf) \
  38.     (syscall(BSD43_(SYS_sysmips), BSD43_(MIPS_HWCONF), \
  39.     BSD43_(option), (conf)))
  40.  
  41. #define    kopt(option,value,op) \
  42.     (syscall(BSD43_(SYS_sysmips), BSD43_(MIPS_KOPT), \
  43.     (option), (value), BSD43_(op), 0, 0))
  44. #endif /* SYSV */
  45.  
  46. cpubd()
  47. {
  48.     struct bsd43_(hw_config) Conf;
  49.  
  50.     if (hwconf(HWCONF_GET,&Conf) < 0)
  51.         return 0;
  52.  
  53.     return Conf.cpubd_type;
  54. }
  55.  
  56. koptKeyswtch()
  57. {
  58.     return kopt("keyswtch",0,KOPT_GET);
  59. }
  60.