Ignore:
Timestamp:
Dec 20, 2017, 4:51:09 PM (7 years ago)
Author:
alain
Message:

Fix bugs in exec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/signal.c

    r407 r409  
    22 * signal.c - signal-management related operations implementation
    33 *
    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)
    57 *
    68 * Copyright (c) UPMC Sorbonne Universites
     
    2325
    2426#include <hal_types.h>
    25 #include <hal_atomic.h>
    2627#include <printk.h>
    27 #include <thread.h>
    28 #include <spinlock.h>
    2928#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 threads
    36         spinlock_lock( &process->th_lock );
    37 
    38     // loop on local threads
    39         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 lock
    51         spinlock_unlock( &process->th_lock );
    52 
    53 }  // end signal_rise()
    5429
    5530/*
Note: See TracChangeset for help on using the changeset viewer.