Changeset 294 for trunk/src/sh_kern.c
- Timestamp:
- Oct 31, 2010, 10:26:42 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_kern.c
r286 r294 169 169 170 170 char * sh_kern_db_syscall (int num, char * prefix, 171 void * in_name, unsigned long * addr,171 void * in_name, unsigned long * addr, 172 172 unsigned int * code1, unsigned int * code2, 173 173 int * size, int direction) … … 177 177 unsigned long x1 = 0, x2 = 0; 178 178 unsigned char * name = (unsigned char *) in_name; 179 struct store2db save; 179 180 180 181 sl_snprintf(path, 128, "K_%s_%04d", prefix, num); 181 182 183 memset(save, '\0', sizeof(struct store2db)); 184 182 185 if (direction == SH_KERN_DBPUSH) 183 186 { 184 x1 = *code1; 185 x2 = *code2; 186 187 sh_hash_push2db (path, *addr, x1, x2, 188 name, (name == NULL) ? 0 : (*size)); 187 save.val0 = *addr; 188 save.val1 = *code1; 189 save.val2 = *code2; 190 save.str = name; 191 save.size = (name == NULL) ? 0 : (*size); 192 193 sh_hash_push2db (path, &save); 189 194 } 190 195 else 191 196 { 192 p = sh_hash_db2pop (path, addr, &x1, &x2, size); 193 *code1 = (unsigned int) x1; 194 *code2 = (unsigned int) x2; 197 p = sh_hash_db2pop (path, &save); 198 199 *addr = (unsigned long) save.val0; 200 *code1 = (unsigned int) save.val1; 201 *code2 = (unsigned int) save.val2; 202 203 *size = (int) save.size; 195 204 } 196 205 return p;
Note:
See TracChangeset
for help on using the changeset viewer.