mirror of
https://github.com/drasko/codezero.git
synced 2026-02-28 17:53:13 +01:00
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:
@@ -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__ */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user