public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: Move Proc observer stuff to LinuxPtraceProc. Date: Sat, 15 Mar 2008 21:25:00 -0000 [thread overview] Message-ID: <20080315212547.31675.qmail@sourceware.org> (raw) The branch, master has been updated via ab02774848b01c39fc6ae5f011409741e5a59f97 (commit) from 267dc2d82fb5a61cb76ff6123c7a5ef0e815ab3a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit ab02774848b01c39fc6ae5f011409741e5a59f97 Author: Andrew Cagney <cagney@redhat.com> Date: Sat Mar 15 17:24:55 2008 -0400 Move Proc observer stuff to LinuxPtraceProc. frysk-core/frysk/proc/ChangeLog 2008-03-15 Andrew Cagney <cagney@redhat.com> * Proc.java (observations): Move to LinuxPtraceProc. (addObservation(Object)): Ditto. (removeObservation(Object)): Ditto. (observationsSize(Object)): Ditto. (observationsIterator(Object)): Ditto. (requestUnblock(Object)): Ditto. ----------------------------------------------------------------------- Summary of changes: frysk-core/frysk/proc/ChangeLog | 7 ++++ frysk-core/frysk/proc/Proc.java | 35 ----------------------- frysk-core/frysk/proc/live/ChangeLog | 7 ++++ frysk-core/frysk/proc/live/LinuxPtraceProc.java | 35 +++++++++++++++++++++++ 4 files changed, 49 insertions(+), 35 deletions(-) First 500 lines of diff: diff --git a/frysk-core/frysk/proc/ChangeLog b/frysk-core/frysk/proc/ChangeLog index 58cf57c..6f431d2 100644 --- a/frysk-core/frysk/proc/ChangeLog +++ b/frysk-core/frysk/proc/ChangeLog @@ -1,5 +1,12 @@ 2008-03-15 Andrew Cagney <cagney@redhat.com> + * Proc.java (observations): Move to LinuxPtraceProc. + (addObservation(Object)): Ditto. + (removeObservation(Object)): Ditto. + (observationsSize(Object)): Ditto. + (observationsIterator(Object)): Ditto. + (requestUnblock(Object)): Ditto. + * Proc.java (creator): Delete. (Proc(int,Proc,Host)): Replace Proc(int,Proc,Host,Task). diff --git a/frysk-core/frysk/proc/Proc.java b/frysk-core/frysk/proc/Proc.java index d8cad3b..5cd5455 100644 --- a/frysk-core/frysk/proc/Proc.java +++ b/frysk-core/frysk/proc/Proc.java @@ -39,10 +39,8 @@ package frysk.proc; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; -import java.util.Iterator; import java.util.LinkedList; import java.util.Map; import java.util.Observable; @@ -195,7 +193,6 @@ public abstract class Proc implements Comparable { public void requestAbandon() { fine.log(this, "abandon"); performDetach(); - observations.clear(); } /** @@ -223,38 +220,6 @@ public abstract class Proc implements Comparable { protected abstract void performDetach(); /** - * The set of observations that currently apply to this task. - * Note that this is a Collection that may contain the same - * Observer object multiple times (for possible different - * observations). - */ - private Collection observations = new LinkedList(); - - public boolean addObservation(Object o) { - return observations.add(o); - } - - public boolean removeObservation(Object o) { - return observations.remove(o); - } - - public int observationsSize() { - return observations.size(); - } - - public Iterator observationsIterator() { - return observations.iterator(); - } - - public void requestUnblock(TaskObserver observerArg) { - Iterator iter = getTasks().iterator(); - while (iter.hasNext()) { - Task task =(Task) iter.next(); - task.requestUnblock(observerArg); - } - } - - /** * Table of this processes child processes. */ private Set childPool = new HashSet(); diff --git a/frysk-core/frysk/proc/live/ChangeLog b/frysk-core/frysk/proc/live/ChangeLog index 2810aa2..09e38ed 100644 --- a/frysk-core/frysk/proc/live/ChangeLog +++ b/frysk-core/frysk/proc/live/ChangeLog @@ -1,5 +1,12 @@ 2008-03-15 Andrew Cagney <cagney@redhat.com> + * LinuxPtraceProc.java (observations): Move from Proc. + (addObservation(Object)): Ditto. + (removeObservation(Object)): Ditto. + (observationsSize(Object)): Ditto. + (observationsIterator(Object)): Ditto. + (requestUnblock(Object)): Ditto. + * LiveTask.java: Update to match Task.java. * LinuxPtraceTask.java: Ditto. diff --git a/frysk-core/frysk/proc/live/LinuxPtraceProc.java b/frysk-core/frysk/proc/live/LinuxPtraceProc.java index ec192ac..b76792a 100644 --- a/frysk-core/frysk/proc/live/LinuxPtraceProc.java +++ b/frysk-core/frysk/proc/live/LinuxPtraceProc.java @@ -39,6 +39,8 @@ package frysk.proc.live; +import java.util.Collection; +import java.util.LinkedList; import java.util.HashSet; import java.util.Set; import frysk.proc.Action; @@ -721,6 +723,39 @@ public class LinuxPtraceProc extends LiveProc { Manager.eventLoop.add(to); } + + /** + * The set of observations that currently apply to this task. + * Note that this is a Collection that may contain the same + * Observer object multiple times (for possible different + * observations). + */ + private final Collection observations = new LinkedList(); + + boolean addObservation(Object o) { + return observations.add(o); + } + + boolean removeObservation(Object o) { + return observations.remove(o); + } + + int observationsSize() { + return observations.size(); + } + + Iterator observationsIterator() { + return observations.iterator(); + } + + void requestUnblock(TaskObserver observerArg) { + Iterator iter = getTasks().iterator(); + while (iter.hasNext()) { + Task task =(Task) iter.next(); + task.requestUnblock(observerArg); + } + } + /** * XXX: Should not be public. */ hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-03-15 21:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080315212547.31675.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).