kernel: remove left-over code from object monitoring
This code is non-functional and is a left over from an old version of the kernel that does not work and is covered through other new features in the kernel, for example object tracing. Jira: ZEP-2013 Change-Id: Id12ad09e2d06186b53cd2f0dd030ac6d37d1229f Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
50553dd700
commit
6ad0420b26
3 changed files with 1 additions and 34 deletions
|
@ -1894,28 +1894,16 @@ struct k_mutex {
|
||||||
struct k_thread *owner;
|
struct k_thread *owner;
|
||||||
uint32_t lock_count;
|
uint32_t lock_count;
|
||||||
int owner_orig_prio;
|
int owner_orig_prio;
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
int num_lock_state_changes;
|
|
||||||
int num_conflicts;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_OBJECT_TRACING_NEXT_PTR(k_mutex);
|
_OBJECT_TRACING_NEXT_PTR(k_mutex);
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
#define _MUTEX_INIT_OBJECT_MONITOR \
|
|
||||||
.num_lock_state_changes = 0, .num_conflicts = 0,
|
|
||||||
#else
|
|
||||||
#define _MUTEX_INIT_OBJECT_MONITOR
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define K_MUTEX_INITIALIZER(obj) \
|
#define K_MUTEX_INITIALIZER(obj) \
|
||||||
{ \
|
{ \
|
||||||
.wait_q = SYS_DLIST_STATIC_INIT(&obj.wait_q), \
|
.wait_q = SYS_DLIST_STATIC_INIT(&obj.wait_q), \
|
||||||
.owner = NULL, \
|
.owner = NULL, \
|
||||||
.lock_count = 0, \
|
.lock_count = 0, \
|
||||||
.owner_orig_prio = K_LOWEST_THREAD_PRIO, \
|
.owner_orig_prio = K_LOWEST_THREAD_PRIO, \
|
||||||
_MUTEX_INIT_OBJECT_MONITOR \
|
|
||||||
_OBJECT_TRACING_INIT \
|
_OBJECT_TRACING_INIT \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -286,9 +286,6 @@ static char *get_existing_block(struct k_mem_pool_block_set *block_set,
|
||||||
/* mark block as unavailable (using XOR to invert) */
|
/* mark block as unavailable (using XOR to invert) */
|
||||||
block_set->quad_block[i].mem_status ^=
|
block_set->quad_block[i].mem_status ^=
|
||||||
1 << free_bit;
|
1 << free_bit;
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
block_set->count++;
|
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -371,9 +368,7 @@ static char *get_block_recursive(struct k_mem_pool *pool,
|
||||||
fr_table[index].quad_block[i].mem_blocks = larger_block;
|
fr_table[index].quad_block[i].mem_blocks = larger_block;
|
||||||
fr_table[index].quad_block[i].mem_status =
|
fr_table[index].quad_block[i].mem_status =
|
||||||
_QUAD_BLOCK_AVAILABLE & (~0x1);
|
_QUAD_BLOCK_AVAILABLE & (~0x1);
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
fr_table[index].count++;
|
|
||||||
#endif
|
|
||||||
return larger_block;
|
return larger_block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,24 +36,9 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <init.h>
|
#include <init.h>
|
||||||
|
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
#define RECORD_STATE_CHANGE(mutex) \
|
|
||||||
do { (mutex)->num_lock_state_changes++; } while ((0))
|
|
||||||
#define RECORD_CONFLICT(mutex) \
|
|
||||||
do { (mutex)->num_conflicts++; } while ((0))
|
|
||||||
#else
|
|
||||||
#define RECORD_STATE_CHANGE(mutex) do { } while ((0))
|
#define RECORD_STATE_CHANGE(mutex) do { } while ((0))
|
||||||
#define RECORD_CONFLICT(mutex) do { } while ((0))
|
#define RECORD_CONFLICT(mutex) do { } while ((0))
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef CONFIG_OBJECT_MONITOR
|
|
||||||
#define INIT_OBJECT_MONITOR(mutex) do { \
|
|
||||||
mutex->num_lock_state_changes = 0; \
|
|
||||||
mutex->num_conflicts = 0; \
|
|
||||||
} while ((0))
|
|
||||||
#else
|
|
||||||
#define INIT_OBJECT_MONITOR(mutex) do { } while ((0))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern struct k_mutex _k_mutex_list_start[];
|
extern struct k_mutex _k_mutex_list_start[];
|
||||||
extern struct k_mutex _k_mutex_list_end[];
|
extern struct k_mutex _k_mutex_list_end[];
|
||||||
|
@ -92,7 +77,6 @@ void k_mutex_init(struct k_mutex *mutex)
|
||||||
sys_dlist_init(&mutex->wait_q);
|
sys_dlist_init(&mutex->wait_q);
|
||||||
|
|
||||||
SYS_TRACING_OBJ_INIT(k_mutex, mutex);
|
SYS_TRACING_OBJ_INIT(k_mutex, mutex);
|
||||||
INIT_OBJECT_MONITOR(mutex);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int new_prio_for_inheritance(int target, int limit)
|
static int new_prio_for_inheritance(int target, int limit)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue