Changeset 2416 for trunk/src/kash/shheap.c
- Timestamp:
- Sep 14, 2010, 2:30:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/shheap.c
r2413 r2416 123 123 124 124 125 int shheap_init(void )125 int shheap_init(void *phead) 126 126 { 127 127 int rc; … … 129 129 SHHEAP_ASSERT(SHHEAP_ALIGN(sizeof(shmemhdr)) == sizeof(shmemhdr)); 130 130 rc = shmtx_init(&g_sh_heap_mtx); 131 g_sh_heap = (shmemchunk *)phead; /* non-zero on fork() */ 131 132 #else 132 133 rc = 0; … … 138 139 139 140 # if K_OS == K_OS_WINDOWS 141 142 /** 143 * Get the head so the child can pass it to shheap_init() after fork(). 144 * 145 * @returns g_sh_heap. 146 */ 147 void *shheap_get_head(void) 148 { 149 return g_sh_heap; 150 } 151 140 152 /** 141 153 * Copies the heap into the child process. … … 180 192 return -1; 181 193 } 182 # endif 183 194 195 # endif /* K_OS == K_OS_WINDOWS */ 184 196 185 197 /**
Note:
See TracChangeset
for help on using the changeset viewer.