am f570883a: Merge "Fix MIPS build."

* commit 'f570883afaad1887da8c30fbfa51e70ffa6f268e':
  Fix MIPS build.
This commit is contained in:
Elliott Hughes
2014-05-23 21:34:25 +00:00
committed by Android Git Automerger
5 changed files with 3 additions and 70 deletions

View File

@@ -23,7 +23,6 @@
#include <errno_portable.h>
#include <filefd_portable.h>
#include <signal_portable.h>
#include <sys/atomics.h>
#define PORTABLE_TAG "filefd_portable"
#include <log_portable.h>
@@ -307,7 +306,7 @@ static int import_fd_env(int verify)
} else {
ASSERT(filefd_mapped_file[fd] == UNUSED_FD_TYPE);
__atomic_inc(&filefd_mapped_files);
__sync_fetch_and_add(&filefd_mapped_files, 1);
ALOGV("%s: ++filefd_mapped_files:%d;", __func__,
filefd_mapped_files);
@@ -358,7 +357,7 @@ __hidden void filefd_opened(int fd, enum filefd_type fd_type)
if (fd >= 0 && fd < __FD_SETSIZE) {
if (filefd_mapped_file[fd] == UNUSED_FD_TYPE) {
__atomic_inc(&filefd_mapped_files);
__sync_fetch_and_add(&filefd_mapped_files, 1);
filefd_mapped_file[fd] = fd_type;
}
ASSERT(filefd_mapped_file[fd] == fd_type);
@@ -375,7 +374,7 @@ __hidden void filefd_closed(int fd)
if (filefd_mapped_file[fd] != UNUSED_FD_TYPE) {
filefd_mapped_file[fd] = UNUSED_FD_TYPE;
filefd_FD_CLOEXEC_file[fd] = 0;
__atomic_dec(&filefd_mapped_files);
__sync_fetch_and_sub(&filefd_mapped_files, 1);
}
}
ALOGV("%s: }", __func__);

View File

@@ -23,36 +23,3 @@
#include <log_portable.h>
/* __sflags is an internal bionic routine but the symbol is exported and there are callers... */
extern int __sflags(const char *, int *);
int
WRAP(__sflags)(const char *mode, int *optr)
{
int rv;
int nflags, pflags;
ALOGV(" ");
ALOGV("%s(mode:%p, optr:%p) {", __func__, mode, optr);
rv = __sflags(mode, &nflags);
/* error - no change to *optr */
if (rv == 0)
goto done;
pflags = nflags & O_ACCMODE;
if (nflags & O_CREAT)
pflags |= O_CREAT_PORTABLE;
if (nflags & O_TRUNC)
pflags |= O_TRUNC_PORTABLE;
if (nflags & O_APPEND)
pflags |= O_APPEND_PORTABLE;
/* Set *optr to portable flags */
*optr = pflags;
done:
ALOGV("%s: return(rv:%d); }", __func__, rv);
return rv;
}

View File

@@ -213,9 +213,6 @@ PTHREAD_WRAPPER(pthread_cond_timedwait_relative_np, (pthread_cond_t *cond, pthre
PTHREAD_WRAPPER(pthread_cond_timeout_np, (pthread_cond_t *cond, pthread_mutex_t *mutex,
unsigned msecs), (cond, mutex, msecs), "(cond:%p, mutex:%p, msecs:%u)");
PTHREAD_WRAPPER(pthread_mutex_lock_timeout_np, (pthread_mutex_t *mutex, unsigned msecs),
(mutex, msecs), "(mutex:%p, msecs:%u)");
PTHREAD_WRAPPER(pthread_rwlockattr_init, (pthread_rwlockattr_t *attr), (attr), "(attr:%p)");
PTHREAD_WRAPPER(pthread_rwlockattr_destroy, (pthread_rwlockattr_t *attr), (attr), "(attr:%p)");

View File

@@ -871,22 +871,6 @@ int WRAP(kill)(pid_t pid, int portable_signum)
}
int WRAP(tkill)(int tid, int portable_signum)
{
extern int REAL(tkill)(int, int);
int rv;
ALOGV(" ");
ALOGV("%s(tid:%d, portable_signum:%d) {", __func__,
tid, portable_signum);
rv = do_kill(tid, portable_signum, REAL(tkill));
ALOGV("%s: return(rv:%d); }", __func__, rv);
return rv;
}
/* tgkill is not exported from android-14 libc.so */
#if 0
int WRAP(tgkill)(int tgid, int tid, int portable_signum)

View File

@@ -561,20 +561,6 @@ int WRAP(syscall)(int portable_number, ...)
}
#endif
#ifdef __NR_tkill_portable
case __NR_tkill_portable: {
int tid, sig;
va_start(ap, portable_number);
tid = va_arg(ap, int);
sig = va_arg(ap, int);
va_end(ap);
ret = WRAP(tkill)(tid, sig);
goto done;
}
#endif
#ifdef __NR_uname_portable
case __NR_uname_portable: native_number = __NR_uname; break;
#endif