Changeset 503


Ignore:
Timestamp:
Aug 25, 2018, 6:28:18 PM (6 years ago)
Author:
viala@…
Message:

Add void type on function that takes no parameters, fix invalid call.

Fix invalid calls to thread_can_yield.

In file included from kern/chdev.c:29:
kern/chdev.c: In function 'chdev_sequencial_server':
kern/chdev.c:329:21: error: too many arguments to function 'thread_can_yield'

assert( thread_can_yield( server ) , "illegal sched_yield\n" );

~

Also fixed signature of mapper_create.

Location:
trunk
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/hal/x86_64/drivers/ioc_ata.c

    r335 r503  
    5454#define ATA_CMD_IDENTIFY                0xEC
    5555
    56 static inline uint16_t ata_data_read()
     56static inline uint16_t ata_data_read( void )
    5757{
    5858        return in16(PIO_ATA_CBR_BASE + ATA_DATA);
     
    7474}
    7575
    76 static inline int ata_wait()
     76static inline int ata_wait( void )
    7777{
    7878        uint8_t status;
     
    148148}
    149149
    150 static void ata_init()
     150static void ata_init( void )
    151151{
    152152        uint8_t data[512];
     
    184184
    185185static void ioc_ata_cmd(xptr_t th_xp);
    186 extern void x86_ioapic_ata0();
     186extern void x86_ioapic_ata0( void );
    187187
    188188void ioc_ata_init(chdev_t *chdev)
  • trunk/kernel/devices/dev_pic.h

    r483 r503  
    8484 ****************************************************************************************/
    8585
    86 typedef void   (bind_irq_t)     ( lid_t lid , struct chdev_s * src_chdev );   
    87 typedef void   (enable_irq_t)   ( lid_t lid , xptr_t src_chdev_xp );   
    88 typedef void   (disable_irq_t)  ( lid_t lid , xptr_t src_chdev_xp );   
    89 typedef void   (enable_timer_t) ( uint32_t period );   
    90 typedef void   (enable_ipi_t)   ( );   
    91 typedef void   (send_ipi_t)     ( cxy_t cxy , lid_t lid ); 
    92 typedef void   (ack_ipi_t)      ( );   
    93 typedef void   (extend_init_t)  ( uint32_t * lapic_base ); 
     86typedef void   (bind_irq_t)     ( lid_t lid , struct chdev_s * src_chdev );
     87typedef void   (enable_irq_t)   ( lid_t lid , xptr_t src_chdev_xp );
     88typedef void   (disable_irq_t)  ( lid_t lid , xptr_t src_chdev_xp );
     89typedef void   (enable_timer_t) ( uint32_t period );
     90typedef void   (enable_ipi_t)   ( void );
     91typedef void   (send_ipi_t)     ( cxy_t cxy , lid_t lid );
     92typedef void   (ack_ipi_t)      ( void );
     93typedef void   (extend_init_t)  ( uint32_t * lapic_base );
    9494 
    9595typedef struct pic_extend_s
  • trunk/kernel/kern/chdev.c

    r492 r503  
    264264
    265265    // deschedule
    266     assert( thread_can_yield( this ) , "illegal sched_yield\n" );
     266    assert( thread_can_yield() , "illegal sched_yield\n" );
    267267    sched_yield("blocked on I/O");
    268268
  • trunk/kernel/kern/do_syscall.c

    r492 r503  
    3434// This ƒonction should never be called...
    3535///////////////////////////////////////////////////////////////////////////////////////
    36 static int sys_undefined()
     36static int sys_undefined( void )
    3737{
    3838    assert( false , "undefined system call" );
  • trunk/kernel/kern/process.c

    r492 r503  
    6565
    6666///////////////////////////
    67 process_t * process_alloc()
     67process_t * process_alloc( void )
    6868{
    6969        kmem_req_t   req;
  • trunk/kernel/kern/process.h

    r485 r503  
    176176 * @ returns pointer on process descriptor if success / return NULL if failure
    177177 ********************************************************************************************/
    178 process_t * process_alloc();
     178process_t * process_alloc( void );
    179179
    180180/*********************************************************************************************
  • trunk/kernel/kern/rpc.c

    r492 r503  
    8383
    8484//////////////////////////////////////////////
    85 void __attribute__((noinline)) rpc_undefined()
     85void __attribute__((noinline)) rpc_undefined( xptr_t xp __attribute__ ((unused)) )
    8686{
    8787        assert( false , "called in cluster %x", local_cxy );
     
    459459
    460460            // RPC thread deschedules
    461             assert( thread_can_yield( server_ptr ) , "illegal sched_yield\n" );
     461            assert( thread_can_yield() , "illegal sched_yield\n" );
    462462            sched_yield("RPC fifo empty");
    463463        }
  • trunk/kernel/kern/rpc.h

    r485 r503  
    176176 * This function is executed in case of illegal RPC index.
    177177 **********************************************************************************/
    178 void __attribute__((noinline)) rpc_undefined();
     178void __attribute__((noinline)) rpc_undefined( xptr_t xp __attribute__ ((unused)) );
    179179
    180180
  • trunk/kernel/kern/thread.c

    r492 r503  
    889889
    890890////////////////////////////////
    891 inline bool_t thread_can_yield()
     891inline bool_t thread_can_yield( void )
    892892{
    893893    thread_t * this = CURRENT_THREAD;
  • trunk/kernel/kern/thread.h

    r485 r503  
    369369 * @ returns true if no locks taken.
    370370 **************************************************************************************/
    371 inline bool_t thread_can_yield();
     371inline bool_t thread_can_yield( void );
    372372
    373373/***************************************************************************************
  • trunk/kernel/mm/mapper.h

    r457 r503  
    105105 * @ return pointer on created mapper if success / return NULL if no memory
    106106 ******************************************************************************************/
    107 mapper_t * mapper_create();
     107mapper_t * mapper_create( void );
    108108
    109109/*******************************************************************************************
  • trunk/kernel/mm/vseg.c

    r492 r503  
    6060
    6161/////////////////////
    62 vseg_t * vseg_alloc()
     62vseg_t * vseg_alloc( void )
    6363{
    6464    kmem_req_t   req;
  • trunk/kernel/mm/vseg.h

    r473 r503  
    102102 * @ return pointer on allocated vseg descriptor if success / return NULL if failure.
    103103 ******************************************************************************************/
    104 vseg_t * vseg_alloc();
     104vseg_t * vseg_alloc( void );
    105105
    106106/*******************************************************************************************
  • trunk/user/fft/fft.c

    r473 r503  
    135135/////////////////////////////////////////////////////////////////////////////////
    136136
    137 void slave();
    138 
    139 double CheckSum();
     137void slave( unsigned int * tid );
     138
     139double CheckSum( void );
    140140
    141141void InitX(double ** x , unsigned int mode);
     
    197197// launch the parallel execution, and makes the instrumentation.
    198198///////////////////////////////////////////////////////////////////
    199 void main()
     199void main ( void )
    200200{
    201201    unsigned int        main_cxy;          // main thread cluster
     
    608608
    609609/////////////////
    610 double CheckSum()
     610double CheckSum( void )
    611611{
    612612    unsigned int         i , j;
  • trunk/user/ksh/ksh.c

    r473 r503  
    822822
    823823/////////////////////////
    824 static void interactive()
     824static void interactive( void )
    825825{
    826826        char           c;                                               // read character
     
    10481048
    10491049//////////
    1050 int main()
     1050int main( void )
    10511051{
    10521052    unsigned int cxy;             // owner cluster identifier for this KSH process
Note: See TracChangeset for help on using the changeset viewer.