summaryrefslogtreecommitdiffstats
path: root/libc/arch-mips64/syscalls
Commit message (Collapse)AuthorAgeFilesLines
* Add sethostname(2).Elliott Hughes2014-11-071-0/+25
| | | | | | Not very useful, but helps building stuff like toybox out of the box. Change-Id: I110e39030452bd093a84278e019c5752d293718d
* Add clock_settime and clock_nanosleep.Haruki Hasegawa2014-10-131-2/+3
| | | | | | | | | | | Add the missing prototypes, fix the existing prototypes to use clockid_t rather than int, fix clock_nanosleep's failure behavior, and add simple tests. Bug: 17644443 Bug: https://code.google.com/p/android/issues/detail?id=77372 Change-Id: I03fba369939403918abcabae9551a7123953d780 Signed-off-by: Haruki Hasegawa <h6a.h4i.0@gmail.com>
* Add posix_fadvise(3).Elliott Hughes2014-09-111-0/+26
| | | | | | | (cherry-pick of 00008263782e484020420c606f7d145fe7d0a4d8.) Bug: 12449798 Change-Id: I07cbf3f670a0d1304b68148325a774f266b5c433
* Ensure __set_errno is still visible on LP32.Elliott Hughes2014-09-08190-570/+190
| | | | | | | | | | | | | | | | | | The use of the .hidden directive to avoid going via the PLT for __set_errno had the side-effect of actually making __set_errno hidden (which is odd because assembler directives don't usually affect symbols defined in a different file --- you can't even create a weak reference to a symbol that's defined in a different file). This change switches the system call stubs over to a new always-hidden __set_errno_internal and has a visible __set_errno on LP32 just for binary compatibility with old NDK apps. (cherry-pick of 7efad83d430f4d824f2aaa75edea5106f6ff8aae.) Bug: 17423135 Change-Id: I6b6d7a05dda85f923d22e5ffd169a91e23499b7b
* Remove _flush_cache(2) for mips64.Dan Albert2014-08-211-27/+0
| | | | | | | | | | Also remove declaration. The only user is compiler-rt, and they can replace that call with one to syscall(2). compiler-rt doesn't currently build on mips64 anyway. Bug: 11156955 Change-Id: Ieae0ba49c8e7aa50253401fc1d7c2d17bc867d39
* Make __set_errno hidden in asm.Dan Albert2014-08-08191-0/+382
| | | | | | | This fixes the build after the -Bsymbolic change. Bug: 16853291 Change-Id: I989c9fec3c32e0289ea257a3bd2b7fd2709b6ce2
* Implement <sys/fsuid.h>.Elliott Hughes2014-07-302-0/+50
| | | | Change-Id: I1e5e50444a1b5a430ba5b5d9b8b1d91219af5e92
* Add splice, tee, and vmsplice.Elliott Hughes2014-06-243-0/+75
| | | | Change-Id: I5f43380b88d776a8bb607b47dbbc5db5a2fe6163
* Cache getpid.Elliott Hughes2014-06-201-2/+3
| | | | | | | | | | | | | | | | | In practice, with this implementation we never need to make a system call. We get the main thread's tid (which is the same as our pid) back from the set_tid_address system call we have to make during initialization. A new pthread will have the same pid as its parent, and a fork child's main (and only) thread will have a pid equal to its tid, which we get for free from the kernel before clone returns. The only time we'd actually have to make a getpid system call now is if we take a signal during fork and the signal handler calls getpid. (That, or we call getpid in the dynamic linker while it's still dealing with its own relocations and hasn't even set up the main thread yet.) Bug: 15387103 Change-Id: I6d4718ed0a5c912fc75b5f738c49a023dbed5189
* Remove ioprio_get(2) and ioprio_set(2) from LP64.Dan Albert2014-06-122-50/+0
| | | | | Bug: 11156955 Change-Id: I07b596d85e4bd6347d488d1a92c8d0a00b5ef3b3
* Remove getdents from bionic.Elliott Hughes2014-06-061-26/+0
| | | | | Bug: 11156955 Change-Id: I6c306989801be552d85fba8a50dcdc79282fb9d2
* Avoid a system call in 'gettid'.Elliott Hughes2014-06-021-25/+0
| | | | | | | | | | | | | System calls can be pretty slow. This is mako, which has one of our lowest latencies: iterations ns/op BM_unistd_getpid 10000000 209 BM_unistd_gettid 200000000 8 Bug: 15297299 (kernel panic from too many gettid calls) Bug: 15315766 (excessive gettid overhead in liblogd) Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb
* Revert "Revert "Lose the hand-written futex assembler.""Elliott Hughes2014-05-281-25/+0
| | | | | | | | | | | | | | | | | | | | | | The problem with the original patch was that using syscall(3) means that errno can be set, but pthread_create(3) was abusing the TLS errno slot as a pthread_mutex_t for the thread startup handshake. There was also a mistake in the check for syscall failures --- it should have checked against -1 instead of 0 (not just because that's the default idiom, but also here because futex(2) can legitimately return values > 0). This patch stops abusing the TLS errno slot and adds a pthread_mutex_t to pthread_internal_t instead. (Note that for LP64 sizeof(pthread_mutex_t) > sizeof(uintptr_t), so we could potentially clobber other TLS slots too.) I've also rewritten the LP32 compatibility stubs to directly reuse the code from the .h file. This reverts commit 75c55ff84ebfa686c7ae2cc8ee431c6a33bd46b4. Bug: 15195455 Change-Id: I6ffb13e5cf6a35d8f59f692d94192aae9ab4593d
* Revert "Lose the hand-written futex assembler."Narayan Kamath2014-05-281-0/+25
| | | | | | | | | | This reverts commit ced906c849704f379d7191822f6d74993d4fa296. Causes issues on art / dalvik due to a broken return value check and other undiagnosed issues. bug: 15195455 Change-Id: I5d6bbb389ecefb0e33a5237421a9d56d32a9317c
* Lose the hand-written futex assembler.Elliott Hughes2014-05-221-25/+0
| | | | | | | Also stop exporting 'futex'. Bug: 12250341 Change-Id: Icc4fa4296cd04dfe0d1061822c69e2eb40c3433a
* Remove the tkill(2) stub.Elliott Hughes2014-05-221-25/+0
| | | | | | | | | glibc doesn't have tkill or tgkill and says "use syscall(3) instead". I've left tgkill since it's quite widely used, but there's no reason to have tkill as well. Bug: 11156955 Change-Id: Ifc0af750320086f829bc9914551c172b501f3b60
* Remove __syslog; we have the public klogctl API.Elliott Hughes2014-05-201-26/+0
| | | | | Bug: 11156955 Change-Id: I5c2cc02f39f76dd32984135f5c12c10bf2853796
* Remove perf_event_open.Elliott Hughes2014-05-201-25/+0
| | | | | | | | | This was accidentally added at a time when you couldn't add a constant to <syscall.h> without generating an assembly stub! (You no longer need to add the constants at all.) Bug: 11156955 Change-Id: I053c17879138787976c744a5ecf7d30ee51dc48f
* Mark sockets on creation (socket()) and accept4().Sreeram Ramachandran2014-05-193-30/+6
| | | | | | Remove the separate syscall for accept() and implement it as accept4(..., 0). Change-Id: Ib0b8f5d7c5013b91eae6bbc3847852eb355c7714
* Hide __signalfd4, used to implement signalfd(3).Elliott Hughes2014-05-161-2/+3
| | | | | Bug: 11156955 Change-Id: I50842279cb5b32ec8bd45193435574e415cd806e
* Mark sockets on accept().Sreeram Ramachandran2014-05-141-2/+3
| | | | | | (cherry picked from commit 58b1f3f6a30a660ad81637c2b50382c3d279243b) Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
* Introduce netd_client, a dynamic library that talks to netd.Sreeram Ramachandran2014-05-131-2/+3
| | | | | | | | | | | The library exists outside bionic. It is dynamically loaded, to replace selected standard socket syscalls with versions that talk to netd. Change connect() to use the library if available. (cherry picked from commit 3a6b627a14df8111b03e452f2df4b5f4938e0e49) Change-Id: Ib6198e19dbc306521a26fcecfdf6e8424d163fc9
* Remove the useless indirection in mips' __set_tls.Elliott Hughes2014-05-121-3/+3
| | | | Change-Id: I12e9d6716c42ccbccc9a186441aca0736bb22d05
* Implement _Exit(3).Elliott Hughes2014-04-081-0/+3
| | | | Change-Id: Ida6ac844cc87d38c9645b197dd8188bb73e27dbe
* Add accept4() syscallAndrei Emeltchenko2014-03-261-0/+25
| | | | | | Add accept4() using SYSCALLS.TXT and gensyscall Change-Id: I6f19f29144186d15d46423e10f2cc4b4223719c6
* Add recvmmsg and sendmmsg syscalls.Guillaume Ranquet2014-02-272-0/+50
| | | | | | | | | Also add the corresponding constant, struct, and function declarations to <sys/socket.h>, and perfunctory tests so we know that the symbols actually exist. Signed-off-by: Guillaume Ranquet <guillaumex.ranquet@intel.com> Change-Id: Ib0d854239d3716be90ad70973c579aff4895a4f7
* Remove the useless _C_LABEL from generated system calls.Elliott Hughes2014-02-1929-29/+29
| | | | Change-Id: Id1d2fd39972652831ea825f6f9cf940b08f42b5c
* Make mips/mips64 syscall stubs more like the other architectures.Elliott Hughes2014-02-19192-1728/+576
| | | | Change-Id: I55f8c1a95f643a6e484f12fbcc25e2c77e55b6b8
* Fix build by avoiding the _C_LABEL macro.Elliott Hughes2014-02-1815-30/+30
| | | | Change-Id: Ide367c2b65071388bd95fbc81a4ed6ae94aec4e4
* Implement some of the missing LFS64 support.Elliott Hughes2014-02-184-16/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This gives us: * <dirent.h> struct dirent64 readdir64, readdir64_r, alphasort64, scandir64 * <fcntl.h> creat64, openat64, open64. * <sys/stat.h> struct stat64 fstat64, fstatat64, lstat64, stat64. * <sys/statvfs.h> struct statvfs64 statvfs64, fstatvfs64. * <sys/vfs.h> struct statfs64 statfs64, fstatfs64. This also removes some of the incorrect #define hacks we've had in the past (for stat64, for example, which we promised to clean up way back in bug 8472078). Bug: 11865851 Bug: 8472078 Change-Id: Ia46443521918519f2dfa64d4621027dfd13ac566
* [MIPS64] Add syscall related filesChris Dearman2014-02-06192-0/+6014
Change-Id: I2f5d05df0e767538a6fe467ca0a2386325f8b71f Signed-off-by: Chris Dearman <chris.dearman@imgtec.com> Signed-off-by: Raghu Gandham <raghu.gandham@imgtec.com> Signed-off-by: Duane Sand <duane.sand@imgtec.com>