head	1.5;
access;
symbols
	bg2_23:1.5
	bg2_22:1.5
	bg2_21:1.5
	bg2_20:1.5
	bg2_16:1.5
	bg2_15:1.5
	bg2_12:1.5
	bg2_07:1.5
	isorc2008_submission:1.4
	handbook_alpha_edition:1.4
	jtres2007_submission:1.4;
locks; strict;
comment	@# @;


1.5
date	2008.02.24.19.07.42;	author martin;	state Exp;
branches;
next	1.4;
commitid	495747c1c07c4567;

1.4
date	2007.06.04.11.45.38;	author martin;	state Exp;
branches;
next	1.3;
commitid	3eb4663fb614567;

1.3
date	2007.05.31.18.22.29;	author martin;	state Exp;
branches;
next	1.2;
commitid	3478465f12614567;

1.2
date	2007.05.30.23.13.19;	author martin;	state Exp;
branches;
next	1.1;
commitid	3807465e050e4567;

1.1
date	2007.05.28.18.09.22;	author martin;	state Exp;
branches;
next	;
commitid	681465b1acf4567;


desc
@@


1.5
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 gcinc;

import joprt.RtThread;

import com.jopdesign.sys.GC;

public class Concurrent {
	

	static SimpVector a, b, c;
	/**
	 * @@param args
	 */
	public static void main(String[] args) {
		
		a = new SimpVector(20);
		b = new SimpVector(100);
		c = new SimpVector(999);

		new RtThread(2, 300000) {
			public void run() {
				for (;;) {
					c.run();
					waitForNextPeriod();
				}
			}			
		};
		new RtThread(3, 100560) {
			public void run() {
				for (;;) {
					b.run();
					waitForNextPeriod();
				}
			}			
		};
		new RtThread(4, 50450) {
			public void run() {
				for (;;) {
					a.run();
					waitForNextPeriod();
				}
			}			
		};

		new RtThread(1, 1000) {
			public void run() {
				for (;;) {
//					int time = RtSystem.currentTimeMicro();
					System.out.print("G");
					GC.gc();
//					int now = RtSystem.currentTimeMicro();
//					System.out.println(now-time);
//					time = now;
					
//					waitForNextPeriod();
				}
			}
		};
		
		GC.setConcurrent();
		RtThread.startMission();
	}

}
@


1.4
log
@no message
@
text
@d1 20
@


1.3
log
@no message
@
text
@d16 1
a16 1
		a = new SimpVector(25);
d20 1
a20 1
		new RtThread(2, 200000) {
d28 1
a28 1
		new RtThread(3, 34560) {
d36 1
a36 1
		new RtThread(4, 23450) {
d45 1
a45 1
		new RtThread(1, 3456) {
@


1.2
log
@now with three threads
@
text
@d20 1
a20 1
		new RtThread(2, 100000) {
@


1.1
log
@concurrent GC test cases
@
text
@d16 2
a17 2
		a = new SimpVector(100);
		b = new SimpVector(25);
d20 17
a36 1
		new RtThread(2, 10000) {
@

