summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2008-07-03 20:44:12 +0000
committerfukachan <fukachan>2008-07-03 20:44:12 +0000
commit1032b3028d97eefd77fb75159aa2e7d9889bac3a (patch)
tree17d04de3c02dce05f28de2d4296bc479a4c52555 /fml/lib/FML/Process
parentaebc6144d05345e62761f3a96ec4fe2da84bc4cb (diff)
downloadfml8-1032b3028d97eefd77fb75159aa2e7d9889bac3a.tar.gz
fml8-1032b3028d97eefd77fb75159aa2e7d9889bac3a.tar.bz2
fml8-1032b3028d97eefd77fb75159aa2e7d9889bac3a.zip
define restriction_state_{set,get}_hold_reason()
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/State.pm31
1 files changed, 30 insertions, 1 deletions
diff --git a/fml/lib/FML/Process/State.pm b/fml/lib/FML/Process/State.pm
index 6db3a7bd..fbdd4fc7 100644
--- a/fml/lib/FML/Process/State.pm
+++ b/fml/lib/FML/Process/State.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: State.pm,v 1.25 2006/03/04 13:58:21 fukachan Exp $
+# $FML: State.pm,v 1.26 2006/04/10 13:10:08 fukachan Exp $
#
package FML::Process::State;
@@ -141,6 +141,35 @@ sub restriction_state_get_ignore_reason
}
+# Descriptions: save reason on hold.
+# Arguments: OBJ($curproc) STR($reason)
+# Side Effects: none
+# Return Value: none
+sub restriction_state_set_hold_reason
+{
+ my ($curproc, $reason) = @_;
+ my $pcb = $curproc->pcb();
+ $pcb->set("check_restrictions", "hold_reason", $reason);
+
+ if ($debug) {
+ $curproc->logdebug("restriction_state_set_hold_reason: $reason");
+ }
+}
+
+
+# Descriptions: return the latest reason on hold.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: none
+sub restriction_state_get_hold_reason
+{
+ my ($curproc) = @_;
+ my $pcb = $curproc->pcb();
+
+ return $pcb->get("check_restrictions", "hold_reason");
+}
+
+
# Descriptions: send message on the latest reason on denial.
# Arguments: OBJ($curproc) STR($type) HASH_REF($msg_args)
# Side Effects: none