Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Implement mmap/munmap #44

Open
wants to merge 108 commits into
base: vita
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
3d219e7
add 'vita' system
xyzz Aug 13, 2015
69b0d56
working (not thread safe) sbrk
xyzz Aug 13, 2015
624ead3
[Vita] Implement a proper thread safe _sbrk_r.
xyzz Aug 13, 2015
2bbaa43
[Vita] Implement a per-thread reent, also a small fix to sbrk.
xyzz Aug 14, 2015
5a8abc0
[Vita] Implement proper __malloc_lock, __malloc_unlock
xyzz Aug 14, 2015
d8e5ec5
[Vita] Implement most of file related syscalls.
xyzz Aug 14, 2015
0c05d37
Proper gettimeofday header
xyzz Aug 17, 2015
37639ed
Disable libgloss for vita build.
xyzz Aug 19, 2015
d456455
Call __libc_init_array in Vita crt0.c
xyzz Sep 17, 2015
3d792ab
Adds a call to uvl_write for handling STDIN, STDOUT, and STDERR.
Sep 4, 2015
57f4136
Renames uvl_write to uvl_log_write.
Sep 6, 2015
f88157d
exit now calls uvl_exit.
Sep 9, 2015
8b68730
(Vita) Add user-defined heap size
frangarcj Sep 20, 2015
99764e9
Merge pull request #6 from frangarcj/vita
xyzz Sep 20, 2015
161dd36
Implement _gettimeofday_r
endrift Sep 21, 2015
8ff4633
Merge pull request #7 from endrift/vita
xyzz Sep 21, 2015
0cb4b2b
Unlock _newlib_fd_mutex even when fd_to_scefd is full, fixes #8
xyzz Sep 22, 2015
aefcd56
Simplify _write_r
xyzz Sep 22, 2015
6fcb342
Add "static" to global variables where applicable.
xyzz Sep 22, 2015
33792ac
Replace sceKernelGetTLSAddr(0x88) with a #define in _init_vita_reent
xyzz Sep 22, 2015
6de3967
Implement _unlink_r
xyzz Sep 22, 2015
d9c305b
Implement _rename_r.
xyzz Sep 22, 2015
ccf528d
Implement _times_r.
xyzz Sep 22, 2015
6fed0c7
Implement _stat_r and _fstat_r.
xyzz Sep 22, 2015
d029bbe
Allows building the manuals using recent versions of TexInfo. (See he…
Sep 28, 2015
faafb94
Merge remote-tracking branch 'origin-newlib' into vita
Sep 29, 2015
eca3c69
Frees the heap memblock when exiting homebrew.
Nov 8, 2015
e763d1b
Merge pull request #1 from MrNetrix/vita
MrNetrix Nov 9, 2015
0003640
Destroy _newlib_sbrk_mutex at _free_vita_heap
xerpi Jan 22, 2016
6073de5
Add _free_vita_reent and _free_vita_malloc
xerpi Jan 22, 2016
2a77c39
Free _newlib_fd_mutex at _free_vita_newlib
xerpi Jan 23, 2016
520ff20
Removed UVL calls from newlib. Is a hack and not the right place.
yifanlu Jun 23, 2016
8cb9ce7
Added default stdin/out/err implementations for Vita
yifanlu Jun 24, 2016
0b71f1a
Fix permissions
xyzz Jul 24, 2016
0ec1e80
vita: make read EOF when reading from stdin/out/err
xyzz Jul 26, 2016
90b1a0f
End process when calling exit
endrift Aug 3, 2016
f1a9dca
Merge pull request #2 from endrift/vita
xyzz Aug 3, 2016
9168bab
Implement a few ways to kill yourself
endrift Aug 18, 2016
277257a
Merge pull request #3 from endrift/kill
xyzz Aug 18, 2016
885eb2c
added sockets to newlib
DaveeFTW Sep 4, 2016
b4f89bc
fix race conditions
DaveeFTW Sep 5, 2016
6a4dc0f
added measures to enforce that stdin/stdout/stderr fd numbers cannot …
DaveeFTW Sep 6, 2016
82e7550
Merge pull request #4 from DaveeFTW/vita
xyzz Sep 6, 2016
2a261ee
implemented dirent.h functionality
DaveeFTW Sep 6, 2016
3350763
update newlib threading for pthread support
DaveeFTW Sep 4, 2016
a103a34
Merge pull request #6 from DaveeFTW/vita-pthread
jdek Sep 7, 2016
fa92db8
reflect vitasdk/utils.h changes
DaveeFTW Sep 7, 2016
961a67c
Merge pull request #7 from DaveeFTW/vita
DaveeFTW Sep 7, 2016
979b147
implemented dup()
DaveeFTW Sep 19, 2016
cd0ed97
cleaned up mutex unlocking paths
DaveeFTW Sep 22, 2016
1efe0bc
Merge pull request #12 from DaveeFTW/dup
jdek Sep 23, 2016
1b85d7e
add more network api & macro
d3m3vilurr Sep 8, 2016
08624e4
Reduce MAX_OPEN_FILES to 256
d3m3vilurr Sep 20, 2016
e8c7d8a
Add custom sys/types.h
d3m3vilurr Sep 20, 2016
7f67d55
Fix can race condition code
d3m3vilurr Sep 24, 2016
c1f62e1
`nfds` should be 0 to MAX_OPEN_FILES - 1
d3m3vilurr Sep 26, 2016
0254c2d
Merge pull request #9 from d3m3vilurr/more-sockets
DaveeFTW Sep 27, 2016
cdbaed8
Add arguments support
frangarcj Sep 29, 2016
a63af0a
Fix errors
frangarcj Sep 30, 2016
a53590e
Update crt0.c
frangarcj Oct 2, 2016
f4dbac0
Add argv[0] as program name
frangarcj Oct 2, 2016
bf07dff
Merge pull request #13 from frangarcj/patch-1
DaveeFTW Nov 5, 2016
c61dcf6
Change SO_NONBLOCK value to 0x1100
d3m3vilurr Nov 7, 2016
b0d637c
Merge pull request #15 from d3m3vilurr/change-so-nonblock
DaveeFTW Nov 7, 2016
d9bd33e
Fix SO_RCVTIMEO option set wrong timeout value.
d3m3vilurr Nov 8, 2016
3a84706
Merge pull request #16 from d3m3vilurr/fix-socket-timeout-options
xyzz Nov 9, 2016
c73abda
Fix IO slow issues
frangarcj Apr 5, 2017
648a092
typo
frangarcj Apr 5, 2017
5c56fbf
More typos
frangarcj Apr 5, 2017
5e17c23
Small fixes
frangarcj Apr 6, 2017
1b87d02
Merge pull request #19 from vitasdk/frangarcj-patch-1
DaveeFTW Apr 6, 2017
1eba445
Merge remote-tracking branch 'davee/vita-dirent' into vita
frangarcj Dec 29, 2017
3793fa9
Merge pull request #25 from frangarcj/vita
TheOfficialFloW Dec 29, 2017
46f8b2d
Fix dirent errors
frangarcj Dec 30, 2017
f7d1fb7
Merge pull request #26 from frangarcj/vita
TheOfficialFloW Dec 30, 2017
21cc1dd
WIP: Add (f)truncate function with sceIoChstat* (#29)
yne Jan 13, 2018
7a07bc8
Create memory.h (#30)
frangarcj Jan 16, 2018
e87a363
Change placeholder to vitasdk
d3m3vilurr Jan 19, 2018
b275e65
Prevent strlen() from exceeding `args` (#32)
yne Jan 27, 2018
50f181f
Free allocated memory at calling closedir (#34)
d3m3vilurr Mar 2, 2018
16da3c9
Add missing INADDR_* macro (#24)
yne Apr 9, 2018
4250500
Add missing SCE_KERNEL_MUTEX_ATTR_RECURSIVE flag
DaveeFTW Apr 22, 2018
ad5d537
Merge pull request #37 from DaveeFTW/patch-1
d3m3vilurr Apr 22, 2018
fc555af
Add sys/errno.h
d3m3vilurr Jul 21, 2018
3e45c76
Redefine err codes and remap network errors
d3m3vilurr Jul 26, 2018
ac4428b
Add Davee into author
d3m3vilurr Jul 26, 2018
1914b9a
Fix wrong error code enum
d3m3vilurr Jan 20, 2019
da3bff0
Fix indent on sys/error.h
d3m3vilurr Jan 23, 2019
74d872e
Just return original error code when dismatch POSIX error code
d3m3vilurr Jan 23, 2019
87df50f
Added INADDR_LOOPBACK and INADDR_NONE defines. (#40)
Rinnegatamante Feb 8, 2019
5ef24f3
Added missing typedefs
Rinnegatamante Feb 16, 2019
be28edb
Merge pull request #38 from d3m3vilurr/errno
d3m3vilurr Feb 17, 2019
cc721af
Make localtime and localtime_r aware of system timezone (#41)
Feb 27, 2019
62f6f95
Move net functions to `net` dir and add getaddrinfo related files
d3m3vilurr Aug 10, 2019
c9ab727
Fix part of the getaddrinfo function
d3m3vilurr Aug 10, 2019
f0eacb8
Add missing defines for getaddrinfo
d3m3vilurr Aug 10, 2019
c915da5
Add arpa inet functions
d3m3vilurr Aug 10, 2019
38c8d3a
Fix type error in inet functions
d3m3vilurr Aug 10, 2019
a583e87
Fill h_name value on gethostbyname
d3m3vilurr Aug 10, 2019
2d2d3bd
Use sce functions for inet_ntop and inet_pton
d3m3vilurr Aug 10, 2019
0c035e4
Add NI_* defines for some libraries like openssl
d3m3vilurr Aug 11, 2019
8daadae
Merge pull request #42 from d3m3vilurr/vita-getaddrinfo
d3m3vilurr Aug 12, 2019
26929d8
Add sockaddr_storage
d3m3vilurr Aug 13, 2019
be08016
Add sockaddr_in6
d3m3vilurr Aug 13, 2019
81abbf9
Initial add netinet/tcp.h
d3m3vilurr Aug 13, 2019
a0e8bfa
Merge pull request #43 from d3m3vilurr/vita-sock-defines
d3m3vilurr Aug 18, 2019
53e6192
Add some more ip socket defines into `netinet/in.h`
d3m3vilurr Oct 6, 2019
abff0b3
Initial implement mmap/munmap functions
d3m3vilurr Oct 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3499,6 +3499,9 @@ case "${target}" in
alpha*-dec-osf*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
arm*vita*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
i[3456789]86-*-linux*)
# This section makes it possible to build newlib natively on linux.
# If we are using a cross compiler then don't configure newlib.
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,9 @@ case "${target}" in
alpha*-dec-osf*)
noconfigdirs="$noconfigdirs target-newlib target-libgloss"
;;
arm*vita*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
i[[3456789]]86-*-linux*)
# This section makes it possible to build newlib natively on linux.
# If we are using a cross compiler then don't configure newlib.
Expand Down
12 changes: 12 additions & 0 deletions newlib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,18 @@ endif
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
else true; fi ; \
done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/netinet/*.h; do \
if [ -f $$i ]; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
else true; fi ; \
done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/arpa/*.h; do \
if [ -f $$i ]; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
else true; fi ; \
done ; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/*; do \
if [ -d $$i ]; then \
for j in $$i/*.h; do \
Expand Down
12 changes: 12 additions & 0 deletions newlib/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -1063,6 +1063,18 @@ install-data-local: install-toollibLIBRARIES
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/`basename $$i`; \
else true; fi ; \
done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/netinet; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/netinet/*.h; do \
if [ -f $$i ]; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/netinet/`basename $$i`; \
else true; fi ; \
done ; \
$(mkinstalldirs) $(DESTDIR)$(tooldir)/include/arpa; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/arpa/*.h; do \
if [ -f $$i ]; then \
$(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/arpa/`basename $$i`; \
else true; fi ; \
done ; \
for i in $(srcdir)/libc/sys/$(sys_dir)/include/*; do \
if [ -d $$i ]; then \
for j in $$i/*.h; do \
Expand Down
7 changes: 7 additions & 0 deletions newlib/configure.host
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,9 @@ case "${host}" in
arc-*-*)
sys_dir=arc
;;
arm*vita*)
sys_dir=vita
;;
arm*-*-*)
sys_dir=arm
if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
Expand Down Expand Up @@ -617,6 +620,10 @@ case "${host}" in
arc-*-*)
syscall_dir=syscalls
;;
arm*vita*)
syscall_dir=syscalls
newlib_cflags="${newlib_cflags} -D__DYNAMIC_REENT__ -DREENTRANT_SYSCALLS_PROVIDED"
;;
arm*-*-pe)
syscall_dir=syscalls
;;
Expand Down
2 changes: 1 addition & 1 deletion newlib/libc/include/machine/time.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _MACHTIME_H_
#define _MACHTIME_H_

#if defined(__rtems__) || defined(__VISIUM__)
#if defined(__rtems__) || defined(__VISIUM__) || defined(__vita__)
#define _CLOCKS_PER_SEC_ 1000000
#elif defined(__aarch64__) || defined(__arm__) || defined(__thumb__)
#define _CLOCKS_PER_SEC_ 100
Expand Down
2 changes: 2 additions & 0 deletions newlib/libc/reent/getreent.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
#undef __getreent
#endif

#if 0
struct _reent *
_DEFUN_VOID(__getreent)
{
return _impure_ptr;
}
#endif
Loading