mem.c File Reference

#include <stdio.h>
#include <os_config.h>
#include <config/config_cparam.h>
#include <config/config_param.h>
#include <sys/arch.h>
#include <sys/process.h>
#include <sys/mem.h>
#include <sys/init.h>
#include <sys/shm.h>
#include <sys/kmsg.h>
#include <sys/kpthread.h>
#include <sys/ksched.h>
#include <sys/decls.h>
#include <sys/bufmalloc.h>
#include <errno.h>

Functions

void alloc_pidq_mem (queuep queue, unsigned int qtype, unsigned int qno)

Variables

pid_t pid_queue_mem [PID_QUEUE_MSIZE]

Detailed Description

This contains the Memory allocation routines.

Function Documentation

void alloc_pidq_mem queuep  queue,
unsigned int  qtype,
unsigned int  qno
 

Allocate memory to the process ID queue's.

  • This includes the Ready_Q and Semaphore_Q. Initial memory is allocated for Ready queue, followed by the semaphore queue.
    Parameters:
    queue is the queue of PIDs

qtype is the queue type. Can be READY_Q or SEMA_Q

  • qno is the Queue number. (eg) There are N_PRIO number of Ready Queue. The qno denotes this number. Memory for queues is allocated sequentially.
    Returns:
    • None
    Note:
    • SEMA_Q is valid only if CONFIG_SEMA is defined.


Variable Documentation

pid_t pid_queue_mem[PID_QUEUE_MSIZE]
 

Memory allocated for storing Process IDs. This memory is used for Ready Queue and Semaphore Queue. The memory is split as follows:

  1. Memory for Ready Queue's.
  2. Memory for Semaphore Queue's.


Generated on Thu Feb 13 14:46:24 2014 for 2014.1_doc by  doxygen 1.4.5