Index: src/examples/thread.c
===================================================================
--- src/examples/thread.c	(revision 7fbe45024a0e66932c8f18b15610b0c295b507fa)
+++ src/examples/thread.c	(revision c84e80aa83b9917829e6f5f923487d8ece403218)
@@ -17,9 +17,16 @@
 struct MyThread {
 	thread_h t;
-	int value;
+	unsigned id;
+	unsigned count;
 };
 
-void ?{}( MyThread * this, int value ) {
-	this->value = value;
+void ?{}( MyThread * this ) {
+	this->id = 0;
+	this->count = 10;
+}
+
+void ?{}( MyThread * this, unsigned id, unsigned count ) {
+	this->id = id;
+	this->count = count;
 }
 
@@ -28,5 +35,11 @@
 void main(MyThread* this) {
 	printf("Main called with %p\n", this);
-	printf("Thread value is %d\n", this->value);
+	printf("Thread %d : Suspending %d times\n", this->id, this->count);
+
+	for(int i = 0; i < this->count; i++) {
+		printf("Thread %d : Suspend No. %d\n", this->id, i + 1);
+		printf("Back to %p\n", &this->t.c);
+		suspend();
+	}
 }
 
@@ -39,28 +52,17 @@
 }
 
-void ?{}( MyThread * this ) {
-	this->value = 1;
-	printf("MyThread created\n");
-	printf("Address %p\n", this);
-	printf("handle %p\n", get_thread(this));
-	printf("main %p\n", main);
-	printf("get_t %p\n", get_thread);
-	printf("invoke %p\n", CtxInvokeThread);
-}
-
 int main() {
 
-	printf("Main is %p\n", this_coroutine());
+	thread(MyThread) thread1;
+	thread(MyThread) thread2;
 
-	printf("Creating thread\n");
+	thread2.handle.id = 1;
 
-	thread(MyThread) thread1;
-
-	printf("Main is %p\n", this_coroutine());
-
-	printf("First thread created\n");
+	printf("\n\nMain is %p\n", this_coroutine());
 
 	kernel_run();
 
+	printf("Kernel terminated correctly\n");
+
 	return 0;
 }
