Perrine Martignoni wrote:
> On 5/9/07, *Gilles Chanteperdrix* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     Perrine Martignoni wrote:
>     > Hello,
>     >
>     > I've build a xenomai test application with Posix skin wich run on an
>     > ARM9. The application works well one time, and when I want to launch
>     > again my application, I have this error message :
>     >
>     >
>     > Xenomai Posix skin init: pthread_setschedparam: Resource temporarily
>     > unavailable
>     >
>     >
>     >
>     > I think something was bad cancelled but I don't see.
> 
>     Resource temporarily unavailable is EAGAIN, it means that there is not
>     enough memory to create the real-time thread. Could you send us the
>     contents of /proc/xenomai/heap before and after running your
>     application  ?
> 
> I have exactly the same problem with cyclictest.
>  
> And here is the context of /proc/xenomai/heap before :
>  
> size=130560:used=64:pagesz=512
>  
> and after :
>  
> 
> size=130560:used=64:pagesz=512
> 
>  
> 
> It doesn't change.

Ok, I will check this at home, since the ARM I have at work behaves
differently.

If you have some spare time, could you apply the attached patch,
recompile the kernel, and run your application ? This patch prints in
the kernel console which step in pthread_setschedparam returns an error.

-- 
                                                 Gilles Chanteperdrix
Index: ksrc/skins/posix/syscall.c
===================================================================
--- ksrc/skins/posix/syscall.c	(révision 2429)
+++ ksrc/skins/posix/syscall.c	(copie de travail)
@@ -202,13 +202,19 @@
 
 	err = pthread_create(&k_tid, &attr, NULL, NULL);
 
-	if (err)
+	if (err) {
+		printk("pthread_create returned %d\n", err);
 		return ERR_PTR(-err);
+	}
 
 	err = xnshadow_map(&k_tid->threadbase, NULL);
+	if (err)
+		printk("xnshadow_map returned %d\n", err);
 
-	if (!err && !__pthread_hash(hkey, k_tid))
+	if (!err && !__pthread_hash(hkey, k_tid)) {
+		printk("pthread_hash returned NULL\n");
 		err = -EAGAIN;
+	}
 
 	if (err)
 		pse51_thread_abort(k_tid, NULL);
@@ -244,8 +250,10 @@
 		/* If the syscall applies to "current", and the latter is not
 		   a Xenomai thread already, then shadow it. */
 		k_tid = __pthread_shadow(curr, &hkey);
-		if (IS_ERR(k_tid))
+		if (IS_ERR(k_tid)) {
+			printk("__pthread_shadow: %d\n", PTR_ERR(k_tid));
 			return PTR_ERR(k_tid);
+		}
 
 		promoted = 1;
 	}
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to