Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - ekawahyu

1
Project logs / Re: Pico-Os... a silly dangerous little coroutine kernel :o)
It seems to be fixed after removing an extra (mistakenly initialized) semaphore. I think that was the issue. If you notice in the main.c, the semaphore init is initializing more than the defined SEM_SIZE.

I want to implement a simple osSleep() which blocks task from running until a certain time is met. I know that this can be easily done with a hardware timer or attach it to the time tick. But for the sake of portability issue, I would like to use something that is already available with the C library such as signal() and alarm(). Unfortunately, alarm() can only be used for one task, anyone has a better idea?
2
Project logs / Re: Pico-Os... a silly dangerous little coroutine kernel :o)
Hmmm... not sure if it was due to the optimization level or not, only declaring local variable as static is the only way to make it work. I cannot reproduce the issue anymore since I cleaned the whole project and rebuilt it.

My project on ARM is a bare metal system with some function stubs for newlib. I am trying to provide the simplest threading-like environment and Pico-OS coroutine is the closest and cleanest implementation I could find so far. I would say that Pico-OS coroutine as a clever hack instead of an ugly hack :)

I will provide the modification of the source code under BSD style license, but I need to fork the project from you if such project exists. That way I can do some attribution to the original creator and pay some respect to the license attached.
4
Project logs / Re: Pico-Os... a silly dangerous little coroutine kernel :o)
I am trying to implement this on an ARM platform, but somehow it gets stuck. Any details on how to port it? Especially with the function pointer and the stack when it is created?

I tested setjmp() and longjmp() to work without any issue on the platform. But modifying the jmp_buff seems the issue here since I don't know how to point to the new stack for each created task.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01302298288session_write_close ( )...(null):0
20.01342429888ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01342430664Database_MySQL->query( ).../DatabaseHandler.php:119
40.05852569408Database_MySQL->error( ).../Db-mysql.class.php:273