diff options
author | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2003-01-21 08:56:16 +0000 |
commit | bf8e8a6e8f0bd9165109f0a258730dd242299815 (patch) | |
tree | f16a2fb9fa7a7fbc4c19e981d278d5f6eb53234d /sys/kern/link_elf_obj.c | |
parent | 2180deee00350fff613a1d1d1328eddc4c0ba9c8 (diff) | |
download | FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.zip FreeBSD-src-bf8e8a6e8f0bd9165109f0a258730dd242299815.tar.gz |
Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
Diffstat (limited to 'sys/kern/link_elf_obj.c')
-rw-r--r-- | sys/kern/link_elf_obj.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index f15803f..6c3e4d4 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -235,7 +235,7 @@ link_elf_link_common_finish(linker_file_t lf) #ifdef DDB GDB_STATE(RT_ADD); ef->gdb.l_addr = lf->address; - newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, M_WAITOK); + newfilename = malloc(strlen(lf->filename) + 1, M_LINKER, 0); strcpy(newfilename, lf->filename); ef->gdb.l_name = newfilename; ef->gdb.l_ld = ef->dynamic; @@ -571,7 +571,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, /* * Read the elf header from the file. */ - firstpage = malloc(PAGE_SIZE, M_LINKER, M_WAITOK); + firstpage = malloc(PAGE_SIZE, M_LINKER, 0); if (firstpage == NULL) { error = ENOMEM; goto out; @@ -702,7 +702,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, goto out; } #else - ef->address = malloc(mapsize, M_LINKER, M_WAITOK); + ef->address = malloc(mapsize, M_LINKER, 0); if (!ef->address) { error = ENOMEM; goto out; @@ -773,7 +773,7 @@ link_elf_load_file(linker_class_t cls, const char* filename, nbytes = hdr->e_shnum * hdr->e_shentsize; if (nbytes == 0 || hdr->e_shoff == 0) goto nosyms; - shdr = malloc(nbytes, M_LINKER, M_WAITOK | M_ZERO); + shdr = malloc(nbytes, M_LINKER, M_ZERO); if (shdr == NULL) { error = ENOMEM; goto out; @@ -796,9 +796,9 @@ link_elf_load_file(linker_class_t cls, const char* filename, goto nosyms; symcnt = shdr[symtabindex].sh_size; - ef->symbase = malloc(symcnt, M_LINKER, M_WAITOK); + ef->symbase = malloc(symcnt, M_LINKER, 0); strcnt = shdr[symstrindex].sh_size; - ef->strbase = malloc(strcnt, M_LINKER, M_WAITOK); + ef->strbase = malloc(strcnt, M_LINKER, 0); if (ef->symbase == NULL || ef->strbase == NULL) { error = ENOMEM; @@ -1124,7 +1124,7 @@ link_elf_lookup_set(linker_file_t lf, const char *name, int len, error = 0, count; len = strlen(name) + sizeof("__start_set_"); /* sizeof includes \0 */ - setsym = malloc(len, M_LINKER, M_WAITOK); + setsym = malloc(len, M_LINKER, 0); if (setsym == NULL) return ENOMEM; |