Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /cml/trunk/src/core-cml/barrier.sml
ViewVC logotype

Diff of /cml/trunk/src/core-cml/barrier.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3572, Fri Feb 18 17:42:41 2011 UTC revision 3573, Fri Feb 18 18:40:37 2011 UTC
# Line 25  Line 25 
25    
26      datatype status = ENROLLED | WAITING | RESIGNED      datatype status = ENROLLED | WAITING | RESIGNED
27    
28      datatype 'a enrolled_barrier = ENROLL of {      datatype 'a enrollment = ENROLL of {
29          bar : 'a barrier,          bar : 'a barrier,
30          sts : status ref        (* current status of this enrollment *)          sts : status ref        (* current status of this enrollment *)
31        }        }
# Line 95  Line 95 
95              | WAITING => (S.atomicEnd(); raise Fail "resign while waiting")              | WAITING => (S.atomicEnd(); raise Fail "resign while waiting")
96              | ENROLLED => (sts := RESIGNED; S.atomicEnd()))              | ENROLLED => (sts := RESIGNED; S.atomicEnd()))
97    
98      (* get the current state of the barrier *)
99        fun value (ENROLL{bar=BAR{state, ...}, ...}) = !state
100    
101    end    end

Legend:
Removed from v.3572  
changed lines
  Added in v.3573

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0