exit() seems to work, but needs more testing.

- Added cleaner allocation of shm addresses by moving the allocation to do_mmap().
- Added deletion routine for all objects: shadow, vm_file of type vfs_file, shm_file, etc.
  - Need to make sure objects get deleted properly after exit().
- Currently we allow a single, unique virtual address for each shm segment.
This commit is contained in:
Bahadir Balban
2008-10-21 14:17:58 +03:00
parent aa2be891cd
commit b20fda9341
11 changed files with 166 additions and 67 deletions

View File

@@ -41,9 +41,10 @@ struct shm_descriptor {
#define SHM_SHMMAX 10
/* Initialises shared memory bookkeeping structures */
void shm_init();
int shm_pool_init();
void *shmat_shmget_internal(struct tcb *task, key_t key, void *shmaddr);
struct vm_file *shm_new(key_t key, unsigned long npages);
void *shm_new_address(int npages);
#endif /* __SHM_H__ */

View File

@@ -3,9 +3,9 @@
#include <l4lib/types.h>
#include <task.h>
void *utcb_vaddr_new(void);
int utcb_pool_init(void);
int utcb_vaddr_del(void *utcb_addr);
void *utcb_new_address(void);
int utcb_delete_address(void *utcb_addr);
/* IPC to send utcb address information to tasks */

View File

@@ -143,6 +143,7 @@ struct vm_file {
unsigned long length;
unsigned int type;
struct vm_object vm_obj;
void (*destroy_priv_data)(struct vm_file *f);
void *priv_data; /* Device pagers use to access device info */
};