iPXE
Functions
mlx_utils_priv.c File Reference
#include <unistd.h>
#include <stdlib.h>
#include <strings.h>
#include "../../mlx_utils/include/private/mlx_utils_priv.h"

Go to the source code of this file.

Functions

mlx_status mlx_utils_delay_in_ms_priv (IN mlx_uint32 msecs)
mlx_status mlx_utils_delay_in_us_priv (IN mlx_uint32 usecs)
mlx_status mlx_utils_ilog2_priv (IN mlx_uint32 i, OUT mlx_uint32 *log)
mlx_status mlx_utils_init_lock_priv (OUT void **lock __attribute__((unused)))
mlx_status mlx_utils_free_lock_priv (IN void *lock __attribute__((unused)))
mlx_status mlx_utils_acquire_lock_priv (IN void *lock __attribute__((unused)))
mlx_status mlx_utils_release_lock_priv (IN void *lock __attribute__((unused)))
mlx_status mlx_utils_rand_priv (IN mlx_utils *utils __attribute__((unused)), OUT mlx_uint32 *rand_num)

Function Documentation

Definition at line 14 of file mlx_utils_priv.c.

References mdelay(), and MLX_SUCCESS.

Referenced by mlx_utils_delay_in_ms().

{
        mdelay(msecs);
        return MLX_SUCCESS;
}

Definition at line 23 of file mlx_utils_priv.c.

References MLX_SUCCESS, and udelay().

Referenced by mlx_utils_delay_in_us().

{
        udelay(usecs);
        return MLX_SUCCESS;
}

Definition at line 32 of file mlx_utils_priv.c.

References fls, and MLX_SUCCESS.

Referenced by mlx_utils_ilog2().

{
        *log = ( fls ( i ) - 1 );
        return MLX_SUCCESS;
}
mlx_status mlx_utils_init_lock_priv ( OUT void **lock   __attribute__(unused))

Definition at line 42 of file mlx_utils_priv.c.

References MLX_SUCCESS.

{
        return MLX_SUCCESS;
}
mlx_status mlx_utils_free_lock_priv ( IN void *lock   __attribute__(unused))

Definition at line 50 of file mlx_utils_priv.c.

References MLX_SUCCESS.

{
        return MLX_SUCCESS;
}
mlx_status mlx_utils_acquire_lock_priv ( IN void *lock   __attribute__(unused))

Definition at line 58 of file mlx_utils_priv.c.

References MLX_SUCCESS.

{
        return MLX_SUCCESS;
}
mlx_status mlx_utils_release_lock_priv ( IN void *lock   __attribute__(unused))

Definition at line 66 of file mlx_utils_priv.c.

References MLX_SUCCESS.

{
        return MLX_SUCCESS;
}
mlx_status mlx_utils_rand_priv ( IN mlx_utils *utils   __attribute__(unused),
OUT mlx_uint32 rand_num 
)

Definition at line 74 of file mlx_utils_priv.c.

References MLX_SUCCESS, and rand().

{
        do {
                *rand_num = rand();
        } while ( *rand_num == 0 );
        return MLX_SUCCESS;
}