OCF Cleanup
**ocf_env**: deleting unused functions from main file Signed-off-by: Slawomir_Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
@@ -127,11 +127,6 @@ void env_allocator_destroy(env_allocator *allocator)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t env_allocator_item_count(env_allocator *allocator)
|
||||
{
|
||||
return env_atomic_read(&allocator->count);
|
||||
}
|
||||
|
||||
/* *** COMPLETION *** */
|
||||
|
||||
void env_completion_init(env_completion *completion)
|
||||
@@ -173,26 +168,12 @@ int env_mutex_lock_interruptible(env_mutex *mutex)
|
||||
return mock();
|
||||
}
|
||||
|
||||
int env_mutex_trylock(env_mutex *mutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(mutex);
|
||||
return mock();
|
||||
}
|
||||
|
||||
void env_mutex_unlock(env_mutex *mutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(mutex);
|
||||
}
|
||||
|
||||
int env_mutex_is_locked(env_mutex *mutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(mutex);
|
||||
return mock();
|
||||
}
|
||||
|
||||
int env_rmutex_init(env_rmutex *rmutex)
|
||||
{
|
||||
function_called();
|
||||
@@ -213,26 +194,12 @@ int env_rmutex_lock_interruptible(env_rmutex *rmutex)
|
||||
return mock();
|
||||
}
|
||||
|
||||
int env_rmutex_trylock(env_rmutex *rmutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(rmutex);
|
||||
return mock();
|
||||
}
|
||||
|
||||
void env_rmutex_unlock(env_rmutex *rmutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(rmutex);
|
||||
}
|
||||
|
||||
int env_rmutex_is_locked(env_rmutex *rmutex)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(rmutex);
|
||||
return mock();
|
||||
}
|
||||
|
||||
int env_rwsem_init(env_rwsem *s)
|
||||
{
|
||||
function_called();
|
||||
@@ -298,11 +265,6 @@ void env_atomic_sub(int i, env_atomic *a)
|
||||
*a -= i;
|
||||
}
|
||||
|
||||
bool env_atomic_sub_and_test(int i, env_atomic *a)
|
||||
{
|
||||
return *a-=i == 0;
|
||||
}
|
||||
|
||||
void env_atomic_inc(env_atomic *a)
|
||||
{
|
||||
++*a;
|
||||
@@ -318,11 +280,6 @@ bool env_atomic_dec_and_test(env_atomic *a)
|
||||
return --*a == 0;
|
||||
}
|
||||
|
||||
bool env_atomic_inc_and_test(env_atomic *a)
|
||||
{
|
||||
return ++*a == 0;
|
||||
}
|
||||
|
||||
int env_atomic_add_return(int i, env_atomic *a)
|
||||
{
|
||||
return *a+=i;
|
||||
@@ -422,18 +379,6 @@ void env_spinlock_unlock(env_spinlock *l)
|
||||
check_expected_ptr(l);
|
||||
}
|
||||
|
||||
void env_spinlock_lock_irq(env_spinlock *l)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(l);
|
||||
}
|
||||
|
||||
void env_spinlock_unlock_irq(env_spinlock *l)
|
||||
{
|
||||
function_called();
|
||||
check_expected_ptr(l);
|
||||
}
|
||||
|
||||
void env_rwlock_init(env_rwlock *l)
|
||||
{
|
||||
function_called();
|
||||
@@ -464,20 +409,6 @@ void env_rwlock_write_unlock(env_rwlock *l)
|
||||
check_expected_ptr(l);
|
||||
}
|
||||
|
||||
void env_waitqueue_init(env_waitqueue *w)
|
||||
{
|
||||
w->completed = false;
|
||||
w->waiting = false;
|
||||
w->co = NULL;
|
||||
}
|
||||
|
||||
void env_waitqueue_wake_up(env_waitqueue *w)
|
||||
{
|
||||
w->completed = true;
|
||||
if (!w->waiting || !w->co)
|
||||
return;
|
||||
}
|
||||
|
||||
void env_bit_set(int nr, volatile void *addr)
|
||||
{
|
||||
char *byte = (char *) addr + (nr >> 3);
|
||||
@@ -510,11 +441,6 @@ void env_touch_softlockup_wd(void)
|
||||
function_called();
|
||||
}
|
||||
|
||||
void env_schedule(void)
|
||||
{
|
||||
function_called();
|
||||
}
|
||||
|
||||
int env_in_interrupt(void)
|
||||
{
|
||||
function_called();
|
||||
|
@@ -120,8 +120,6 @@ void *env_allocator_new(env_allocator *allocator);
|
||||
|
||||
void env_allocator_del(env_allocator *allocator, void *item);
|
||||
|
||||
uint32_t env_allocator_item_count(env_allocator *allocator);
|
||||
|
||||
/* *** MUTEX *** */
|
||||
|
||||
typedef struct {
|
||||
@@ -134,12 +132,8 @@ void env_mutex_lock(env_mutex *mutex);
|
||||
|
||||
int env_mutex_lock_interruptible(env_mutex *mutex);
|
||||
|
||||
int env_mutex_trylock(env_mutex *mutex);
|
||||
|
||||
void env_mutex_unlock(env_mutex *mutex);
|
||||
|
||||
int env_mutex_is_locked(env_mutex *mutex);
|
||||
|
||||
/* *** RECURSIVE MUTEX *** */
|
||||
|
||||
typedef env_mutex env_rmutex;
|
||||
@@ -150,12 +144,8 @@ void env_rmutex_lock(env_rmutex *rmutex);
|
||||
|
||||
int env_rmutex_lock_interruptible(env_rmutex *rmutex);
|
||||
|
||||
int env_rmutex_trylock(env_rmutex *rmutex);
|
||||
|
||||
void env_rmutex_unlock(env_rmutex *rmutex);
|
||||
|
||||
int env_rmutex_is_locked(env_rmutex *rmutex);
|
||||
|
||||
/* *** RW SEMAPHORE *** */
|
||||
typedef struct {
|
||||
pthread_rwlock_t lock;
|
||||
@@ -175,8 +165,6 @@ void env_rwsem_down_write(env_rwsem *s);
|
||||
|
||||
int env_rwsem_down_write_trylock(env_rwsem *s);
|
||||
|
||||
int env_rwsem_is_locked(env_rwsem *s);
|
||||
|
||||
/* *** ATOMIC VARIABLES *** */
|
||||
|
||||
typedef int env_atomic;
|
||||
@@ -191,16 +179,12 @@ void env_atomic_add(int i, env_atomic *a);
|
||||
|
||||
void env_atomic_sub(int i, env_atomic *a);
|
||||
|
||||
bool env_atomic_sub_and_test(int i, env_atomic *a);
|
||||
|
||||
void env_atomic_inc(env_atomic *a);
|
||||
|
||||
void env_atomic_dec(env_atomic *a);
|
||||
|
||||
bool env_atomic_dec_and_test(env_atomic *a);
|
||||
|
||||
bool env_atomic_inc_and_test(env_atomic *a);
|
||||
|
||||
int env_atomic_add_return(int i, env_atomic *a);
|
||||
|
||||
int env_atomic_sub_return(int i, env_atomic *a);
|
||||
@@ -253,10 +237,6 @@ void env_spinlock_lock(env_spinlock *l);
|
||||
|
||||
void env_spinlock_unlock(env_spinlock *l);
|
||||
|
||||
void env_spinlock_lock_irq(env_spinlock *l);
|
||||
|
||||
void env_spinlock_unlock_irq(env_spinlock *l);
|
||||
|
||||
#define env_spinlock_lock_irqsave(l, flags) \
|
||||
env_spinlock_lock(l); (void)flags;
|
||||
|
||||
@@ -286,10 +266,6 @@ typedef struct {
|
||||
Coroutine *co;
|
||||
} env_waitqueue;
|
||||
|
||||
void env_waitqueue_init(env_waitqueue *w);
|
||||
|
||||
void env_waitqueue_wake_up(env_waitqueue *w);
|
||||
|
||||
#define env_waitqueue_wait(w, condition) \
|
||||
({ \
|
||||
int __ret = 0; \
|
||||
@@ -314,8 +290,6 @@ bool env_bit_test(int nr, const volatile unsigned long *addr);
|
||||
|
||||
void env_touch_softlockup_wd(void);
|
||||
|
||||
void env_schedule(void);
|
||||
|
||||
int env_in_interrupt(void);
|
||||
|
||||
uint64_t env_get_tick_count(void);
|
||||
|
Reference in New Issue
Block a user