Ignore:
Timestamp:
May 3, 2018, 5:51:22 PM (6 years ago)
Author:
alain
Message:

1/ Fix a bug in the Multithreaded "sort" applicationr:
The pthread_create() arguments must be declared as global variables.
2/ The exit syscall can be called by any thread of a process..

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/devices/dev_fbf.c

    r438 r440  
    119119//////////////////////////////////////////////////////////////////////////////////
    120120// This static function is called by dev_fbf_read() & dev_fbf_write() functions.
    121 // It builds and registers the command in the calling thread descriptor, after
    122 // translation of buffer virtual address to physical address.
    123 // Then, it registers the calling thead in the relevant DMA chdev waiting queue.
     121// It builds and registers the command in the calling thread descriptor.
     122// Then, it registers the calling thread in the relevant DMA chdev waiting queue.
    124123// Finally it blocks on the THREAD_BLOCKED_DEV condition and deschedule.
    125124////////////////////////////////////i/////////////////////////////////////////////
     
    129128                               uint32_t  offset )
    130129{
    131     error_t     error;
    132     paddr_t     buf_paddr;
    133 
    134     thread_t * this = CURRENT_THREAD;              // pointer on client thread
    135 
    136     // Get buffer physical address
    137     error = vmm_v2p_translate( CONFIG_KERNEL_IDENTITY_MAP , buffer , &buf_paddr );
    138  
    139     // check buffer is mapped
    140     assert( (error == 0) , __FUNCTION__ ,
    141     "cannot translate vaddr = %p in process %x\n", buffer, this->process->pid );
    142130
    143131    // get extended pointer on FBF chdev descriptor
     
    160148
    161149    // compute extended pointers on frame buffer and memory buffer
    162     xptr_t  mem_buf_xp = XPTR( local_cxy , (void *)(intptr_t)buf_paddr );
     150    xptr_t  mem_buf_xp = XPTR( local_cxy , buffer );
    163151    xptr_t  fbf_buf_xp = base + offset;
    164152
Note: See TracChangeset for help on using the changeset viewer.