Subversion Repositories HelenOS

Rev

Rev 3386 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3386 Rev 4153
Line 29... Line 29...
29
/** @addtogroup genericddi
29
/** @addtogroup genericddi
30
 * @{
30
 * @{
31
 */
31
 */
32
/**
32
/**
33
 * @file
33
 * @file
34
 * @brief   Device numbers.
34
 * @brief Device numbers.
35
 */
35
 */
36
 
36
 
37
#include <arch/types.h>
37
#include <arch/types.h>
38
#include <ddi/device.h>
38
#include <ddi/device.h>
39
#include <atomic.h>
39
#include <atomic.h>
Line 45... Line 45...
45
 *
45
 *
46
 * @return Unique device number.
46
 * @return Unique device number.
47
 */
47
 */
48
devno_t device_assign_devno(void)
48
devno_t device_assign_devno(void)
49
{
49
{
50
    devno_t devno; 
-
 
51
 
-
 
52
    devno = (devno_t) atomic_postinc(&last);
50
    devno_t devno = (devno_t) atomic_postinc(&last);
53
    ASSERT(devno >= 0);
51
    ASSERT(devno >= 0);
54
 
52
   
55
    return devno;
53
    return devno;
56
}
54
}
57
 
55
 
-
 
56
unative_t sys_device_assign_devno(void)
-
 
57
{
-
 
58
    return (unative_t) device_assign_devno();
-
 
59
}
-
 
60
 
58
/** @}
61
/** @}
59
 */
62
 */