Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 84afc7b in mainline for kernel/generic/src/ddi/device.c


Ignore:
Timestamp:
2009-03-18T10:53:12Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial
Children:
e749794
Parents:
8015eeec
Message:

as kernel little brother drivers are not needed anymore, the device numbers do not have to be correlated between kernel and uspace in any way
introduce new syscall sys_device_assign_devno() for generating system-wide unique device numbers for uspace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ddi/device.c

    r8015eeec r84afc7b  
    3232/**
    3333 * @file
    34  * @brief       Device numbers.
     34 * @brief Device numbers.
    3535 */
    3636
     
    4848devno_t device_assign_devno(void)
    4949{
    50         devno_t devno; 
     50        devno_t devno = (devno_t) atomic_postinc(&last);
     51        ASSERT(devno >= 0);
     52       
     53        return devno;
     54}
    5155
    52         devno = (devno_t) atomic_postinc(&last);
    53         ASSERT(devno >= 0);
    54 
    55         return devno;
     56unative_t sys_device_assign_devno(void)
     57{
     58        return (unative_t) device_assign_devno();
    5659}
    5760
Note: See TracChangeset for help on using the changeset viewer.