Changeset 11130


Ignore:
Timestamp:
02/11/07 15:10:53 (14 years ago)
Author:
piso
Message:

Make MUTEX a primitive Lisp type (Eric Marsden)

Location:
trunk/j/src/org/armedbear/lisp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/BuiltInClass.java

    r11066 r11130  
    22 * BuiltInClass.java
    33 *
    4  * Copyright (C) 2003-2006 Peter Graves
    5  * $Id: BuiltInClass.java,v 1.53 2006-06-12 12:23:33 piso Exp $
     4 * Copyright (C) 2003-2007 Peter Graves
     5 * $Id: BuiltInClass.java,v 1.54 2007-02-11 15:10:52 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    9494  public static final BuiltInClass MAILBOX              = addClass(Symbol.MAILBOX);
    9595  public static final BuiltInClass METHOD_COMBINATION   = addClass(Symbol.METHOD_COMBINATION);
     96  public static final BuiltInClass MUTEX                = addClass(Symbol.MUTEX);
    9697  public static final BuiltInClass NIL_VECTOR           = addClass(Symbol.NIL_VECTOR);
    9798  public static final BuiltInClass NULL                 = addClass(Symbol.NULL);
     
    184185    METHOD_COMBINATION.setDirectSuperclass(CLASS_T);
    185186    METHOD_COMBINATION.setCPL(METHOD_COMBINATION, CLASS_T);
     187    MUTEX.setDirectSuperclass(CLASS_T);
     188    MUTEX.setCPL(MUTEX, CLASS_T);
    186189    NIL_VECTOR.setDirectSuperclass(STRING);
    187190    NIL_VECTOR.setCPL(NIL_VECTOR, STRING, VECTOR, ARRAY, SEQUENCE, CLASS_T);
  • trunk/j/src/org/armedbear/lisp/Mutex.java

    r7627 r11130  
    22 * Mutex.java
    33 *
    4  * Copyright (C) 2004 Peter Graves
    5  * $Id: Mutex.java,v 1.2 2004-09-09 14:59:29 piso Exp $
     4 * Copyright (C) 2004-2007 Peter Graves
     5 * $Id: Mutex.java,v 1.3 2007-02-11 15:10:53 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3838{
    3939    private boolean inUse;
     40
     41    public LispObject typeOf()
     42    {
     43        return Symbol.MUTEX;
     44    }
     45
     46    public LispObject classOf()
     47    {
     48        return BuiltInClass.MUTEX;
     49    }
     50
     51    public LispObject typep(LispObject typeSpecifier) throws ConditionThrowable
     52    {
     53        if (typeSpecifier == Symbol.MUTEX)
     54            return T;
     55        if (typeSpecifier == BuiltInClass.MUTEX)
     56            return T;
     57        return super.typep(typeSpecifier);
     58    }
    4059
    4160    public void acquire() throws InterruptedException
  • trunk/j/src/org/armedbear/lisp/Symbol.java

    r11125 r11130  
    33 *
    44 * Copyright (C) 2002-2007 Peter Graves
    5  * $Id: Symbol.java,v 1.247 2007-01-22 16:34:34 piso Exp $
     5 * $Id: Symbol.java,v 1.248 2007-02-11 15:10:53 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    28472847  public static final Symbol COMPILER_UNSUPPORTED_FEATURE_ERROR =
    28482848    PACKAGE_EXT.addExternalSymbol("COMPILER-UNSUPPORTED-FEATURE-ERROR");
     2849  public static final Symbol MUTEX =
     2850    PACKAGE_EXT.addExternalSymbol("MUTEX");
    28492851  public static final Symbol THREAD =
    28502852    PACKAGE_EXT.addExternalSymbol("THREAD");
Note: See TracChangeset for help on using the changeset viewer.