Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 09e764b

Browse files
Treehugger RobotGerrit Code Review
authored andcommitted
Merge "Remove guards on constants and types." into main
2 parents 413b4a2 + a642197 commit 09e764b

File tree

3 files changed

+0
-16
lines changed

3 files changed

+0
-16
lines changed

libc/include/bits/pthread_types.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,15 @@ typedef struct {
4343
#endif
4444
} pthread_attr_t;
4545

46-
#if __ANDROID_API__ >= 24
4746
typedef struct {
4847
#if defined(__LP64__)
4948
int64_t __private[4];
5049
#else
5150
int32_t __private[8];
5251
#endif
5352
} pthread_barrier_t;
54-
#endif
5553

56-
#if __ANDROID_API__ >= 24
5754
typedef int pthread_barrierattr_t;
58-
#endif
5955

6056
typedef struct {
6157
#if defined(__LP64__)
@@ -91,14 +87,12 @@ typedef struct {
9187

9288
typedef long pthread_rwlockattr_t;
9389

94-
#if __ANDROID_API__ >= 24
9590
typedef struct {
9691
#if defined(__LP64__)
9792
int64_t __private;
9893
#else
9994
int32_t __private[2];
10095
#endif
10196
} pthread_spinlock_t;
102-
#endif
10397

10498
typedef long pthread_t;

libc/include/fcntl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,12 @@ __BEGIN_DECLS
9393
/** Flag for splice(). */
9494
#define SPLICE_F_GIFT 8
9595

96-
#if __ANDROID_API__ >= 26
9796
/** Flag for sync_file_range(). */
9897
#define SYNC_FILE_RANGE_WAIT_BEFORE 1
9998
/** Flag for sync_file_range(). */
10099
#define SYNC_FILE_RANGE_WRITE 2
101100
/** Flag for sync_file_range(). */
102101
#define SYNC_FILE_RANGE_WAIT_AFTER 4
103-
#endif
104102

105103
/**
106104
* [creat(2)](https://man7.org/linux/man-pages/man2/creat.2.html)

libc/include/pthread.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@ enum {
7070

7171
#define PTHREAD_ONCE_INIT 0
7272

73-
#if __ANDROID_API__ >= 24
7473
#define PTHREAD_BARRIER_SERIAL_THREAD (-1)
75-
#endif
7674

7775
#if defined(__LP64__)
7876
#define PTHREAD_STACK_MIN 16384
@@ -246,26 +244,20 @@ int pthread_rwlock_trywrlock(pthread_rwlock_t* _Nonnull __rwlock);
246244
int pthread_rwlock_unlock(pthread_rwlock_t* _Nonnull __rwlock);
247245
int pthread_rwlock_wrlock(pthread_rwlock_t* _Nonnull __rwlock);
248246

249-
#if __ANDROID_API__ >= 24
250247
int pthread_barrierattr_init(pthread_barrierattr_t* _Nonnull __attr) __INTRODUCED_IN(24);
251248
int pthread_barrierattr_destroy(pthread_barrierattr_t* _Nonnull __attr) __INTRODUCED_IN(24);
252249
int pthread_barrierattr_getpshared(const pthread_barrierattr_t* _Nonnull __attr, int* _Nonnull __shared) __INTRODUCED_IN(24);
253250
int pthread_barrierattr_setpshared(pthread_barrierattr_t* _Nonnull __attr, int __shared) __INTRODUCED_IN(24);
254-
#endif
255251

256-
#if __ANDROID_API__ >= 24
257252
int pthread_barrier_init(pthread_barrier_t* _Nonnull __barrier, const pthread_barrierattr_t* _Nullable __attr, unsigned __count) __INTRODUCED_IN(24);
258253
int pthread_barrier_destroy(pthread_barrier_t* _Nonnull __barrier) __INTRODUCED_IN(24);
259254
int pthread_barrier_wait(pthread_barrier_t* _Nonnull __barrier) __INTRODUCED_IN(24);
260-
#endif
261255

262-
#if __ANDROID_API__ >= 24
263256
int pthread_spin_destroy(pthread_spinlock_t* _Nonnull __spinlock) __INTRODUCED_IN(24);
264257
int pthread_spin_init(pthread_spinlock_t* _Nonnull __spinlock, int __shared) __INTRODUCED_IN(24);
265258
int pthread_spin_lock(pthread_spinlock_t* _Nonnull __spinlock) __INTRODUCED_IN(24);
266259
int pthread_spin_trylock(pthread_spinlock_t* _Nonnull __spinlock) __INTRODUCED_IN(24);
267260
int pthread_spin_unlock(pthread_spinlock_t* _Nonnull __spinlock) __INTRODUCED_IN(24);
268-
#endif
269261

270262
pthread_t pthread_self(void) __attribute_const__;
271263

0 commit comments

Comments
 (0)