Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 623 → Rev 624

/kernel/trunk/generic/include/list.h
32,11 → 32,18
#include <arch/types.h>
#include <typedefs.h>
 
/** Doubly linked list head and link type. */
struct link {
link_t *prev;
link_t *next;
link_t *prev; /**< Pointer to the previous item in the list. */
link_t *next; /**< Pointer to the next item in the list. */
};
 
/** Declare and initialize statically allocated list.
*
* @param name Name of the new statically allocated list.
*/
#define LIST_INITIALIZE(name) link_t name = { .prev = &name, .next = &name }
 
/** Initialize doubly-linked circular list link
*
* Initialize doubly-linked list link.
/kernel/trunk/generic/include/mm/frame.h
83,7 → 83,6
extern spinlock_t zone_head_lock; /**< this lock protects zone_head list */
extern link_t zone_head; /**< list of all zones in the system */
 
extern void zone_init(void);
extern zone_t *zone_create(__address start, size_t size, int flags);
extern void zone_attach(zone_t *zone);
 
/kernel/trunk/generic/src/console/kconsole.c
66,7 → 66,7
*/
SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */
link_t cmd_head; /**< Command list. */
LIST_INITIALIZE(cmd_head); /**< Command list. */
 
static cmd_info_t *parse_cmdline(char *cmdline, size_t len);
static bool parse_argument(char *cmdline, size_t len, index_t *start, index_t *end);
77,8 → 77,6
{
int i;
 
list_initialize(&cmd_head);
 
cmd_init();
for (i=0; i<KCONSOLE_HISTORY; i++)
history[i][0] = '\0';
/kernel/trunk/generic/src/proc/task.c
37,9 → 37,8
#include <list.h>
 
SPINLOCK_INITIALIZE(tasks_lock);
link_t tasks_head;
LIST_INITIALIZE(tasks_head);
 
 
/** Initialize tasks
*
* Initialize kernel tasks support.
48,7 → 47,6
void task_init(void)
{
TASK = NULL;
list_initialize(&tasks_head);
}
 
 
/kernel/trunk/generic/src/proc/thread.c
55,7 → 55,7
char *thread_states[] = {"Invalid", "Running", "Sleeping", "Ready", "Entering", "Exiting"}; /**< Thread states */
 
SPINLOCK_INITIALIZE(threads_lock); /**< Lock protecting threads_head list. For locking rules, see declaration thereof. */
link_t threads_head; /**< List of all threads. */
LIST_INITIALIZE(threads_head); /**< List of all threads. */
 
SPINLOCK_INITIALIZE(tidlock);
__u32 last_tid = 0;
96,7 → 96,6
{
THREAD = NULL;
nrdy = 0;
list_initialize(&threads_head);
}
 
 
/kernel/trunk/generic/src/mm/frame.c
42,7 → 42,7
#include <align.h>
 
SPINLOCK_INITIALIZE(zone_head_lock); /**< this lock protects zone_head list */
link_t zone_head; /**< list of all zones in the system */
LIST_INITIALIZE(zone_head); /**< list of all zones in the system */
 
/** Blacklist containing non-available areas of memory.
*
68,7 → 68,6
void frame_init(void)
{
if (config.cpu_active == 1) {
zone_init();
frame_region_not_free(KA2PA(config.base), config.kernel_size);
}
 
235,16 → 234,6
zone_blacklist[index].size = size;
}
 
 
/** Initialize zonekeeping
*
* Initialize zonekeeping.
*/
void zone_init(void)
{
list_initialize(&zone_head);
}
 
/** Create frame zones in region of available memory.
*
* Avoid any black listed areas of non-available memory.