Skip to content

Commit

Permalink
[libc] Enable more functions on riscv64.
Browse files Browse the repository at this point in the history
The list of headers has also been updated. Some duplicated entrypoints
have been removed.
  • Loading branch information
Siva Chandra committed Mar 14, 2023
1 parent c024fa4 commit 537e6e7
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 5 deletions.
64 changes: 59 additions & 5 deletions libc/config/linux/riscv64/entrypoints.txt
Expand Up @@ -54,9 +54,6 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strdup
libc.src.string.strerror
libc.src.string.strerror_r
libc.src.string.strdup
libc.src.string.strerror
libc.src.string.strerror_r
libc.src.string.strlcat
libc.src.string.strlcpy
libc.src.string.strlen
Expand All @@ -65,12 +62,10 @@ set(TARGET_LIBC_ENTRYPOINTS
libc.src.string.strncmp
libc.src.string.strncpy
libc.src.string.strndup
libc.src.string.strndup
libc.src.string.strnlen
libc.src.string.strpbrk
libc.src.string.strrchr
libc.src.string.strsignal
libc.src.string.strsignal
libc.src.string.strspn
libc.src.string.strstr
libc.src.string.strtok
Expand Down Expand Up @@ -332,6 +327,44 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.network.ntohl
libc.src.network.ntohs

# pthread.h entrypoints
libc.src.pthread.pthread_atfork
libc.src.pthread.pthread_attr_destroy
libc.src.pthread.pthread_attr_init
libc.src.pthread.pthread_attr_getdetachstate
libc.src.pthread.pthread_attr_getguardsize
libc.src.pthread.pthread_attr_getstack
libc.src.pthread.pthread_attr_getstacksize
libc.src.pthread.pthread_attr_setdetachstate
libc.src.pthread.pthread_attr_setguardsize
libc.src.pthread.pthread_attr_setstack
libc.src.pthread.pthread_attr_setstacksize
libc.src.pthread.pthread_create
libc.src.pthread.pthread_detach
libc.src.pthread.pthread_equal
libc.src.pthread.pthread_exit
libc.src.pthread.pthread_getname_np
libc.src.pthread.pthread_getspecific
libc.src.pthread.pthread_join
libc.src.pthread.pthread_key_create
libc.src.pthread.pthread_key_delete
libc.src.pthread.pthread_self
libc.src.pthread.pthread_setname_np
libc.src.pthread.pthread_mutex_destroy
libc.src.pthread.pthread_mutex_init
libc.src.pthread.pthread_mutex_lock
libc.src.pthread.pthread_mutex_unlock
libc.src.pthread.pthread_mutexattr_destroy
libc.src.pthread.pthread_mutexattr_init
libc.src.pthread.pthread_mutexattr_getpshared
libc.src.pthread.pthread_mutexattr_getrobust
libc.src.pthread.pthread_mutexattr_gettype
libc.src.pthread.pthread_mutexattr_setpshared
libc.src.pthread.pthread_mutexattr_setrobust
libc.src.pthread.pthread_mutexattr_settype
libc.src.pthread.pthread_once
libc.src.pthread.pthread_setspecific

# sched.h entrypoints
libc.src.sched.__sched_getcpucount

Expand Down Expand Up @@ -371,6 +404,18 @@ if(LLVM_LIBC_FULL_BUILD)
libc.src.stdlib.exit
libc.src.stdlib.getenv

# signal.h entrypoints
libc.src.signal.raise
libc.src.signal.kill
libc.src.signal.sigaction
libc.src.signal.sigaltstack
libc.src.signal.sigdelset
libc.src.signal.sigaddset
libc.src.signal.sigemptyset
libc.src.signal.sigprocmask
libc.src.signal.sigfillset
libc.src.signal.signal

# threads.h entrypoints
libc.src.threads.call_once
libc.src.threads.cnd_broadcast
Expand Down Expand Up @@ -408,6 +453,15 @@ if(LLVM_LIBC_FULL_BUILD)

# unistd.h entrypoints
libc.src.unistd.environ
libc.src.unistd.execv
libc.src.unistd.getopt
libc.src.unistd.optarg
libc.src.unistd.optind
libc.src.unistd.optopt
libc.src.unistd.opterr

# sys/select.h entrypoints
libc.src.sys.select.select
)
endif()

Expand Down
9 changes: 9 additions & 0 deletions libc/config/linux/riscv64/headers.txt
@@ -1,12 +1,21 @@
set(TARGET_PUBLIC_HEADERS
libc.include.assert
libc.include.ctype
libc.include.errno
libc.include.fenv
libc.include.inttypes
libc.include.math
libc.include.pthread
libc.include.signal
libc.include.sched
libc.include.stdio
libc.include.stdlib
libc.include.string
libc.include.strings
libc.include.sys_mman
libc.include.sys_socket
libc.include.sys_syscall
libc.include.threads
libc.include.time
libc.include.unistd
)

0 comments on commit 537e6e7

Please sign in to comment.