Changeset 409 for trunk/kernel/kern/signal.c
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/signal.c
r407 r409 2 2 * signal.c - signal-management related operations implementation 3 3 * 4 * Author Alain Greiner (2016,2017) 4 * Author Ghassan Almaless (2008,2009,2010,2011,2012) 5 * Mohamed Lamine Karaoui (2015) 6 * Alain Greiner (2016,2017) 5 7 * 6 8 * Copyright (c) UPMC Sorbonne Universites … … 23 25 24 26 #include <hal_types.h> 25 #include <hal_atomic.h>26 27 #include <printk.h> 27 #include <thread.h>28 #include <spinlock.h>29 28 #include <signal.h> 30 31 //////////////////////////////////////32 void signal_rise( process_t * process,33 uint32_t sig_id )34 {35 // get the lock protecting the set of local threads36 spinlock_lock( &process->th_lock );37 38 // loop on local threads39 thread_t * thread;40 uint32_t i;41 for( i = 0 ; i < process->th_nr ; i++ )42 {43 thread = process->th_tbl[i];44 hal_atomic_or( &thread->signals , (1 << sig_id) );45 46 signal_dmsg("\n[DBG] %s : thread %x in process %x received signal %d\n",47 __FUNCTION__, thread->trdid , process->pid , sig_id );48 }49 50 // release the lock51 spinlock_unlock( &process->th_lock );52 53 } // end signal_rise()54 29 55 30 /*
Note: See TracChangeset
for help on using the changeset viewer.