Hi all,
At last I have had a few seconds to think about all this...
I think the Peter Wurmsdobler's simplicissimi simplicius list almost has
it.
I'll reproduce here to remind us.
Watch out for some suggested changes....
Not all of this works yet
In general all this should work in both User Space and kernel space.
The LXRT approach can be used to make it work in user space.
Hard deadlines will not be provided in user space.
IRQ's
void rtl_request_global_irq( unsigned int irq,
unsigned int (*handler)(unsigned int,struct
pt_regs *));
Question do we need pt_regs ???
void rtl_hard_enable_irq( unsigned int irq);
void rtl_hard_disable_irq( unsigned int irq);
void rtl_release_global_irq( unsigned int irq);
Question do we need to assign an IRQ to a CPU ??
Tasks
rtl_pthread_t * rtl_pthread_create( char * name,rtl_pthread_attr_t *
attr
void * ( *start_routine)(void *), void * arg);
Notes...
allocate from a preset stack of task structures
use a char name that will appear in /proc
attr can be NULL for default action.
special rtl_pthread_t structure to prevent confusion with
" real " Pthreads.
stack , priority stack size, cpu to run on etc go into the attr
NULL defaults will work
int rtl_pthread_delete(rtl_pthread_t * thread);
New one... we can change some of the attrs here
int rtl_pthread_set_attr(rtl_pthread_t * thread, rtl_pthread_attr*
attr);
int rtl_pthread_suspend(rtl_pthread_t * thread);
int rtl_pthread_wakeup(rtl_pthread_t * thread);
int rtl_pthread_wait(rtl_time * time); note time can be null to wait
for next period
otherwise time is an absolute
time to wait until
int rtl_pthread_make_periodic(rtl_pthread_t * thread,rtl_time *
start_time,rtl_time * period);
Fifo's
rtl_fifo_t * rtl_fifo_create( char * name , int size );
Note the fifo has a name like the task that appears in /proc/rtl/fifos
An arbitary fifo number will be used .
int rtl_fifo_destroy(rtl_fifo_t * fifo);
int rtl_fifo_create_handler(rtl_fifo_t * fifo ,int (* handler
)(rtl_fifo_t * fifo));
Shm
rtl_shm_t * rtl_shm_create( char * name , unsigned int size , void **
shm );
Note again a name is used.
This appears in /proc/rtl/shm
int rtl_shm_destroy(rtl_shm_t * shm);
Time
unsigned int rtl_get_time(int *cpu_id) gets time in nanosecs ( NULL
for system int id for a given cpu)
Sem
rtl_sem_t * rtl_sem_create( char * name , unsigned int value );
Note again a name is used.
This appears in /proc/rtl/sem
int rtl_sem_destroy(rtl_sem_t * sem);
int rtl_sem_give(rtl_sem_t * sem);
int rtl_sem_take(rtl_sem_t * sem, rtl_time * time); time period to wait
or NULL for wait forever
This is a mixture of what I have seen in both systems and I think has
some uniformity to make it
easy to understand.
But then I am biased.
Any comments.
Don't worry about how it is going to work for now just think about the
presentation and features.
Try to pretend that this is the first time you have seen this.
Thanks
Phil Wilshire
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/