head	1.4;
access;
symbols
	bg2_23:1.4
	bg2_22:1.4
	bg2_21:1.4
	bg2_20:1.4
	bg2_16:1.4
	bg2_15:1.4
	bg2_12:1.4
	bg2_07:1.4
	isorc2008_submission:1.3
	handbook_alpha_edition:1.2
	jtres2007_submission:1.2
	bg1_07:1.2
	bg1_06:1.2
	bg1_05:1.2
	TAL_101:1.2
	TAL_100:1.2
	jtres_submission:1.2
	wises06_submission:1.2
	lctes2006_submission:1.2
	rtgc_isorc2006:1.2.0.4
	isorc2006:1.2.0.2
	rtgc_paper:1.2
	bg1_00:1.2
	nohandle:1.2
	thesis:1.1.1.1
	arelease:1.1.1.1
	avendor:1.1.1;
locks; strict;
comment	@# @;


1.4
date	2008.02.24.19.43.13;	author martin;	state Exp;
branches;
next	1.3;
commitid	57b047c1c8d04567;

1.3
date	2007.11.15.14.09.59;	author martin;	state Exp;
branches;
next	1.2;
commitid	10a1473c53364567;

1.2
date	2005.05.11.16.18.07;	author martin;	state Exp;
branches;
next	1.1;
commitid	566d42822fd54567;

1.1
date	2004.02.19.13.22.13;	author martin;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2004.02.19.13.22.13;	author martin;	state Exp;
branches;
next	;


desc
@@


1.4
log
@JOP goes GPL
@
text
@/*
  This file is part of JOP, the Java Optimized Processor
    see <http://www.jopdesign.com/>

  Copyright (C) 2001-2008, Martin Schoeberl (martin@@jopdesign.com)

  This program 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, either version 3 of the License, or
  (at your option) any later version.

  This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package testrt;
import joprt.RtThread;
import joprt.SwEvent;
import util.Dbg;

public class Event {

	public final static int CNT = 10;
	static SwEvent sev;

	public static void main(String[] args) {

		sev = new SwEvent(2, 10000) {

			public void handle() {
				System.out.println("fire!");
			}
		};

		RtThread rt = new RtThread(1, 100000) {
			public void run() {

				int i;

				for (i=0; i<CNT; ++i) {
					waitForNextPeriod();
					System.out.println("befor");
					sev.fire();
					System.out.println("after");
				}
			
				for (;;) waitForNextPeriod();
			}
		};

		RtThread.startMission();

		for (;;) {
			;			// busy do nothing
		}
	}

}
@


1.3
log
@System.out instead of Dbg.wr
@
text
@d1 20
@


1.2
log
@resync with current development
@
text
@a12 2
		Dbg.initSer();				// use serial line for debug output

d16 1
a16 1
				Dbg.wr("fire!");
d27 1
a27 1
					Dbg.wr("\nbefor");
d29 1
a29 1
					Dbg.wr("after");
@


1.1
log
@Initial revision
@
text
@d2 3
a4 3
import util.*;
import joprt.*;
import com.jopdesign.sys.Native;
@


1.1.1.1
log
@initial cvs import.
@
text
@@
