Changeset 95c675b in mainline for uspace/lib/posix/source/dlfcn.c
- Timestamp:
- 2017-10-17T13:11:35Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 60af4cdb
- Parents:
- dbf32b1 (diff), a416d070 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
uspace/lib/posix/source/dlfcn.c (moved) (moved from kernel/generic/src/ddi/device.c ) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/dlfcn.c
rdbf32b1 r95c675b 1 1 /* 2 * Copyright (c) 20 06 Jakub Jermar2 * Copyright (c) 2017 Vojtech Horky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup genericddi29 /** @addtogroup libposix 30 30 * @{ 31 31 */ 32 /**33 * @file34 * @brief Device numbers.35 */36 32 37 #include <typedefs.h> 38 #include <ddi/device.h> 39 #include <atomic.h> 40 #include <debug.h> 33 #define LIBPOSIX_INTERNAL 34 #define __POSIX_DEF__(x) posix_##x 41 35 42 static atomic_t last; 36 #include "internal/common.h" 37 #include "posix/dlfcn.h" 43 38 44 /** Assign new device number. 45 * 46 * @return Unique device number. 47 */ 48 devno_t device_assign_devno(void) 39 #include "libc/dlfcn.h" 40 41 void *posix_dlopen(const char *filename, int flags) 49 42 { 50 devno_t devno = (devno_t) atomic_postinc(&last); 51 ASSERT(devno >= 0); 43 if (flags != 0) { 44 fprintf(stderr, "dlopen() not implemented with non-zero flags (%s:%d), something will NOT work.\n", __FILE__, __LINE__); 45 } 52 46 53 return d evno;47 return dlopen(filename, 0); 54 48 } 55 49 56 sysarg_t sys_device_assign_devno(void)50 void *posix_dlsym(void *handle, const char *symbol) 57 51 { 58 return (sysarg_t) device_assign_devno(); 52 return dlsym(handle, symbol); 53 } 54 55 int posix_dlclose(void *handle) 56 { 57 not_implemented(); 58 return 0; 59 } 60 61 char *posix_dlerror(void) 62 { 63 not_implemented(); 64 return (char *)"dlerror()"; 59 65 } 60 66
Note:
See TracChangeset
for help on using the changeset viewer.
