taiHEN  1.0
CFW framework for PS Vita
proc_map.h
1 
4 #ifndef TAI_PROC_MAP_HEADER
5 #define TAI_PROC_MAP_HEADER
6 
7 #include <psp2kern/types.h>
8 #include "taihen_internal.h"
9 
23 typedef struct _tai_proc_map {
24  int nbuckets;
25  SceUID lock;
28 
29 int proc_map_init(void);
30 void proc_map_deinit(void);
32 void proc_map_free(tai_proc_map_t *map);
33 int proc_map_try_insert(tai_proc_map_t *map, tai_patch_t *patch, tai_patch_t **existing);
34 int proc_map_remove_all_pid(tai_proc_map_t *map, SceUID pid, tai_patch_t **head);
36 
39 #endif // TAI_PROC_MAP_HEADER
SceUID lock
Mutex for accessing buckets.
Definition: proc_map.h:25
tai_proc_map_t * proc_map_alloc(int nbuckets)
Allocates a new map.
Definition: proc_map.c:69
void proc_map_deinit(void)
Cleans up the map system.
Definition: proc_map.c:56
The actual map in memory.
Definition: proc_map.h:23
Internal data for a process.
int proc_map_remove(tai_proc_map_t *map, tai_patch_t *patch)
Remove a single patch from the map.
Definition: proc_map.c:233
void proc_map_free(tai_proc_map_t *map)
Frees a map.
Definition: proc_map.c:89
tai_proc_t * buckets[]
Buckets.
Definition: proc_map.h:26
A patch containing either a hook chain or an injection.
int proc_map_remove_all_pid(tai_proc_map_t *map, SceUID pid, tai_patch_t **head)
Removes every patch associated with a given pid from the map.
Definition: proc_map.c:202
int nbuckets
Number of buckets set by proc_map_alloc
Definition: proc_map.h:24
int proc_map_try_insert(tai_proc_map_t *map, tai_patch_t *patch, tai_patch_t **existing)
Inserts into the map if no overlap or get patch that completely overlaps.
Definition: proc_map.c:114
struct _tai_proc_map tai_proc_map_t
The actual map in memory.
int proc_map_init(void)
Initializes the map system.
Definition: proc_map.c:38