Fix a lot of man7 links to be more specific.
Bug: https://github.com/android/ndk/issues/2113
Change-Id: Ifc3add91c39422985c63e895dc32443b8f736c9d
diff --git a/libc/include/sched.h b/libc/include/sched.h
index 7a2dcad..58dd9a6 100644
--- a/libc/include/sched.h
+++ b/libc/include/sched.h
@@ -236,12 +236,12 @@
int sched_getaffinity(pid_t __pid, size_t __set_size, cpu_set_t* _Nonnull __set);
/**
- * [CPU_ZERO](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) clears all
+ * [CPU_ZERO](https://man7.org/linux/man-pages/man3/CPU_ZERO.3.html) clears all
* bits in a static CPU set.
*/
#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t), set)
/**
- * [CPU_ZERO_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) clears all
+ * [CPU_ZERO_S](https://man7.org/linux/man-pages/man3/CPU_ZERO_S.3.html) clears all
* bits in a dynamic CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_ZERO_S(setsize, set) __builtin_memset(set, 0, setsize)
@@ -252,7 +252,7 @@
*/
#define CPU_SET(cpu, set) CPU_SET_S(cpu, sizeof(cpu_set_t), set)
/**
- * [CPU_SET_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) sets one
+ * [CPU_SET_S](https://man7.org/linux/man-pages/man3/CPU_SET_S.3.html) sets one
* bit in a dynamic CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_SET_S(cpu, setsize, set) \
@@ -263,12 +263,12 @@
} while (0)
/**
- * [CPU_CLR](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) clears one
+ * [CPU_CLR](https://man7.org/linux/man-pages/man3/CPU_CLR.3.html) clears one
* bit in a static CPU set.
*/
#define CPU_CLR(cpu, set) CPU_CLR_S(cpu, sizeof(cpu_set_t), set)
/**
- * [CPU_CLR_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) clears one
+ * [CPU_CLR_S](https://man7.org/linux/man-pages/man3/CPU_CLR_S.3.html) clears one
* bit in a dynamic CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_CLR_S(cpu, setsize, set) \
@@ -279,12 +279,12 @@
} while (0)
/**
- * [CPU_ISSET](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) tests
+ * [CPU_ISSET](https://man7.org/linux/man-pages/man3/CPU_ISSET.3.html) tests
* whether the given bit is set in a static CPU set.
*/
#define CPU_ISSET(cpu, set) CPU_ISSET_S(cpu, sizeof(cpu_set_t), set)
/**
- * [CPU_ISSET_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) tests
+ * [CPU_ISSET_S](https://man7.org/linux/man-pages/man3/CPU_ISSET_S.3.html) tests
* whether the given bit is set in a dynamic CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_ISSET_S(cpu, setsize, set) \
@@ -296,58 +296,58 @@
}))
/**
- * [CPU_COUNT](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) counts
+ * [CPU_COUNT](https://man7.org/linux/man-pages/man3/CPU_COUNT.3.html) counts
* how many bits are set in a static CPU set.
*/
#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t), set)
/**
- * [CPU_COUNT_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) counts
+ * [CPU_COUNT_S](https://man7.org/linux/man-pages/man3/CPU_COUNT_S.3.html) counts
* how many bits are set in a dynamic CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_COUNT_S(setsize, set) __sched_cpucount((setsize), (set))
int __sched_cpucount(size_t __set_size, const cpu_set_t* _Nonnull __set);
/**
- * [CPU_EQUAL](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) tests
+ * [CPU_EQUAL](https://man7.org/linux/man-pages/man3/CPU_EQUAL.3.html) tests
* whether two static CPU sets have the same bits set and cleared as each other.
*/
#define CPU_EQUAL(set1, set2) CPU_EQUAL_S(sizeof(cpu_set_t), set1, set2)
/**
- * [CPU_EQUAL_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) tests
+ * [CPU_EQUAL_S](https://man7.org/linux/man-pages/man3/CPU_EQUAL_S.3.html) tests
* whether two dynamic CPU sets allocated by `CPU_ALLOC` have the same bits
* set and cleared as each other.
*/
#define CPU_EQUAL_S(setsize, set1, set2) (__builtin_memcmp(set1, set2, setsize) == 0)
/**
- * [CPU_AND](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) ands two
+ * [CPU_AND](https://man7.org/linux/man-pages/man3/CPU_AND.3.html) ands two
* static CPU sets.
*/
#define CPU_AND(dst, set1, set2) __CPU_OP(dst, set1, set2, &)
/**
- * [CPU_AND_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) ands two
+ * [CPU_AND_S](https://man7.org/linux/man-pages/man3/CPU_AND_S.3.html) ands two
* dynamic CPU sets allocated by `CPU_ALLOC`.
*/
#define CPU_AND_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, &)
/**
- * [CPU_OR](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) ors two
+ * [CPU_OR](https://man7.org/linux/man-pages/man3/CPU_OR.3.html) ors two
* static CPU sets.
*/
#define CPU_OR(dst, set1, set2) __CPU_OP(dst, set1, set2, |)
/**
- * [CPU_OR_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html) ors two
+ * [CPU_OR_S](https://man7.org/linux/man-pages/man3/CPU_OR_S.3.html) ors two
* dynamic CPU sets allocated by `CPU_ALLOC`.
*/
#define CPU_OR_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, |)
/**
- * [CPU_XOR](https://man7.org/linux/man-pages/man3/CPU_SET.3.html)
+ * [CPU_XOR](https://man7.org/linux/man-pages/man3/CPU_XOR.3.html)
* exclusive-ors two static CPU sets.
*/
#define CPU_XOR(dst, set1, set2) __CPU_OP(dst, set1, set2, ^)
/**
- * [CPU_XOR_S](https://man7.org/linux/man-pages/man3/CPU_SET.3.html)
+ * [CPU_XOR_S](https://man7.org/linux/man-pages/man3/CPU_XOR_S.3.html)
* exclusive-ors two dynamic CPU sets allocated by `CPU_ALLOC`.
*/
#define CPU_XOR_S(setsize, dst, set1, set2) __CPU_OP_S(setsize, dst, set1, set2, ^)
@@ -365,21 +365,21 @@
} while (0)
/**
- * [CPU_ALLOC_SIZE](https://man7.org/linux/man-pages/man3/CPU_SET.3.html)
+ * [CPU_ALLOC_SIZE](https://man7.org/linux/man-pages/man3/CPU_ALLOC_SIZE.3.html)
* returns the size of a CPU set large enough for CPUs in the range 0..count-1.
*/
#define CPU_ALLOC_SIZE(count) \
__CPU_ELT((count) + (__CPU_BITS - 1)) * sizeof(__CPU_BITTYPE)
/**
- * [CPU_ALLOC](https://man7.org/linux/man-pages/man3/CPU_SET.3.html)
+ * [CPU_ALLOC](https://man7.org/linux/man-pages/man3/CPU_ALLOC.3.html)
* allocates a CPU set large enough for CPUs in the range 0..count-1.
*/
#define CPU_ALLOC(count) __sched_cpualloc((count))
cpu_set_t* _Nullable __sched_cpualloc(size_t __count);
/**
- * [CPU_FREE](https://man7.org/linux/man-pages/man3/CPU_SET.3.html)
+ * [CPU_FREE](https://man7.org/linux/man-pages/man3/CPU_FREE.3.html)
* deallocates a CPU set allocated by `CPU_ALLOC`.
*/
#define CPU_FREE(set) __sched_cpufree((set))