public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM]  master: Fold Id into TaskId.
@ 2008-02-27 21:19 cagney
  0 siblings, 0 replies; only message in thread
From: cagney @ 2008-02-27 21:19 UTC (permalink / raw)
  To: frysk-cvs

The branch, master has been updated
       via  85b7a239f83c060989244bb0d234db0afe059a05 (commit)
      from  f0bc57dd50f9c00eddfc9b054fd9e5f2e717de36 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email.

- Log -----------------------------------------------------------------
commit 85b7a239f83c060989244bb0d234db0afe059a05
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Feb 27 16:18:40 2008 -0500

    Fold Id into TaskId.
    
    frysk-core/frysk/proc/ChangeLog
    2008-02-27  Andrew Cagney  <cagney@redhat.com>
    
    	* Id.java: Delete.
    	* TaskId.java: Update.

-----------------------------------------------------------------------

Summary of changes:
 frysk-core/frysk/proc/ChangeLog   |    3 +
 frysk-core/frysk/proc/Id.java     |  111 -------------------------------------
 frysk-core/frysk/proc/TaskId.java |   62 ++++++++++++++-------
 3 files changed, 44 insertions(+), 132 deletions(-)
 delete mode 100644 frysk-core/frysk/proc/Id.java

First 500 lines of diff:
diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog
index 863fd83..6ee5f3e 100644
--- a/frysk-core/frysk/proc/ChangeLog
+++ b/frysk-core/frysk/proc/ChangeLog
@@ -1,5 +1,8 @@
 2008-02-27  Andrew Cagney  <cagney@redhat.com>
 
+	* Id.java: Delete.
+	* TaskId.java: Update.
+
 	* ProcEvent.java (getProcFromTaskId()): Delete.
 	* Host.java (get(TaskId)): Delete.
 	* Proc.java (getMainTask()): Use taskPool, not Host.
diff --git a/frysk-core/frysk/proc/Id.java b/frysk-core/frysk/proc/Id.java
deleted file mode 100644
index f96ec9b..0000000
--- a/frysk-core/frysk/proc/Id.java
+++ /dev/null
@@ -1,111 +0,0 @@
-// This file is part of the program FRYSK.
-//
-// Copyright 2005, 2006, 2007, Red Hat Inc.
-//
-// FRYSK is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// FRYSK is distributed in the hope that it will be useful, but
-// WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// General Public License for more details.
-// 
-// You should have received a copy of the GNU General Public License
-// along with FRYSK; if not, write to the Free Software Foundation,
-// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
-// 
-// In addition, as a special exception, Red Hat, Inc. gives You the
-// additional right to link the code of FRYSK with code not covered
-// under the GNU General Public License ("Non-GPL Code") and to
-// distribute linked combinations including the two, subject to the
-// limitations in this paragraph. Non-GPL Code permitted under this
-// exception must only link to the code of FRYSK through those well
-// defined interfaces identified in the file named EXCEPTION found in
-// the source code files (the "Approved Interfaces"). The files of
-// Non-GPL Code may instantiate templates or use macros or inline
-// functions from the Approved Interfaces without causing the
-// resulting work to be covered by the GNU General Public
-// License. Only Red Hat, Inc. may make changes or additions to the
-// list of Approved Interfaces. You must obey the GNU General Public
-// License in all respects for all of the FRYSK code and other code
-// used in conjunction with FRYSK except the Non-GPL Code covered by
-// this exception. If you modify this file, you may extend this
-// exception to your version of the file, but you are not obligated to
-// do so. If you do not wish to provide this exception without
-// modification, you must delete this exception statement from your
-// version and license this file solely under the GPL without
-// exception.
-
-package frysk.proc;
-
-/**
- * Light weight identifier.
- *
- * This implements comparable so can be used for searching and the
- * like.  Anything wanting to search for a task should use this.
- */
-
-class Id
-    implements Comparable
-{
-    /**
-     * XXX: Should not be public, but some code likes to poke it so
-     * that it has a re-usable ID.
-     */
-    public int id;
-    protected Id ()
-    {
-	id = -1;
-    }
-    protected Id (int id)
-    {
-	this.id = id;
-    }
-    /**
-     * From the point of view of IDs, is THIS class and the Object
-     * compatible?
-     *
-     * For the object hierarchy Task extends TaskId extends Id, Task
-     * and TaskId are considered compatible.
-     */
-    protected boolean isCompatible (Object o)
-    {
-	return (o instanceof Id);
-    }
-    /**
-     * Is the object equals to this one.
-     */
-    public boolean equals (Object o)
-    {
-	if (isCompatible (o))
-	    return ((Id)o).id == id;
-	else
-	    return false;
-    }
-    /**
-     * Return the hash code for this ID (hash on the underlying ID
-     * value).
-     */
-    public int hashCode ()
-    {
-	return id;
-    }
-    /**
-     * Assuming that the two objects are the same, do a relative
-     * comparison.
-     */
-    public int compareTo (Object o)
-    {
-	Id rhs = (Id)o;
-	// Should this be calling isCompatible?
-	return rhs.id - this.id;
-    }
-    /**
-     * Return a string representation of the object.
-     */
-    public String toString ()
-    {
-	return "" + id;
-    }
-}
diff --git a/frysk-core/frysk/proc/TaskId.java b/frysk-core/frysk/proc/TaskId.java
index f347111..ac33b30 100644
--- a/frysk-core/frysk/proc/TaskId.java
+++ b/frysk-core/frysk/proc/TaskId.java
@@ -1,6 +1,6 @@
 // This file is part of the program FRYSK.
 //
-// Copyright 2005, 2006, 2007, Red Hat Inc.
+// Copyright 2005, 2006, 2007, 2008, Red Hat Inc.
 //
 // FRYSK is free software; you can redistribute it and/or modify it
 // under the terms of the GNU General Public License as published by
@@ -45,33 +45,53 @@ package frysk.proc;
  * This implements comparable so can be used for searching and the
  * like.  Anything wanting to search for a task should use this.
  */
-
-public class TaskId
-    extends Id
-{
-    public TaskId ()
-    {
-	super ();
+class TaskId implements Comparable {
+    /**
+     * XXX: Should not be public, but some code likes to poke it so
+     * that it has a re-usable ID.
+     */
+    public int id;
+    TaskId() {
+	id = -1;
     }
-    public TaskId (int id)
-    {
-	super (id);
+    TaskId(int id) {
+	this.id = id;
     }
-    public String toString ()
-    {
-	return ("{TaskId," + super.toString () + "}");
+    /**
+     * Is the object equals to this one.
+     */
+    public boolean equals(Object o) {
+	if (o instanceof TaskId)
+	    return ((TaskId)o).id == id;
+	else
+	    return false;
     }
-    protected boolean isCompatible (Object o)
-    {
-	return (o instanceof TaskId);
+    /**
+     * Return the hash code for this ID (hash on the underlying ID
+     * value).
+     */
+    public int hashCode() {
+	return id;
+    }
+    /**
+     * Assuming that the two objects are the same, do a relative
+     * comparison.
+     */
+    public int compareTo(Object o) {
+	TaskId rhs = (TaskId)o;
+	return rhs.id - this.id;
+    }
+    /**
+     * Return a string representation of the object.
+     */
+    public String toString() {
+	return ("{TaskId," + super.toString () + "}");
     }
-    
     /**
      * Get the TID for this TaskID.
      * @return the TID
      */
-    public int intValue()
-    {
-      return id; // field in superclass
+    public int intValue() {
+	return id; // field in superclass
     }
 }


hooks/post-receive
--
frysk system monitor/debugger


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-27 21:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-27 21:19 [SCM] master: Fold Id into TaskId cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).