Skip to content

Commit 67bb22f

Browse files
fandreuzDavid Holmes
authored andcommitted
8367085: Sort os/posix includes
Reviewed-by: ayang, dholmes
1 parent ecfba66 commit 67bb22f

File tree

8 files changed

+18
-17
lines changed

8 files changed

+18
-17
lines changed

src/hotspot/os/posix/attachListener_posix.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@
2424

2525
#include "logging/log.hpp"
2626
#include "memory/allocation.inline.hpp"
27+
#include "os_posix.hpp"
2728
#include "runtime/interfaceSupport.inline.hpp"
2829
#include "runtime/os.inline.hpp"
29-
#include "os_posix.hpp"
3030
#include "services/attachListener.hpp"
3131
#include "utilities/checkedCast.hpp"
3232
#include "utilities/macros.hpp"
3333

34-
#include <unistd.h>
3534
#include <signal.h>
36-
#include <sys/types.h>
3735
#include <sys/socket.h>
38-
#include <sys/un.h>
3936
#include <sys/stat.h>
37+
#include <sys/types.h>
38+
#include <sys/un.h>
39+
#include <unistd.h>
4040

4141
#if INCLUDE_SERVICES
4242
#ifndef AIX

src/hotspot/os/posix/os_posix.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,13 @@
7070
#include <grp.h>
7171
#include <locale.h>
7272
#include <netdb.h>
73-
#include <pwd.h>
7473
#include <pthread.h>
74+
#include <pwd.h>
7575
#include <signal.h>
76+
#include <spawn.h>
7677
#include <sys/mman.h>
7778
#include <sys/resource.h>
7879
#include <sys/socket.h>
79-
#include <spawn.h>
80-
#include <sys/resource.h>
8180
#include <sys/time.h>
8281
#include <sys/times.h>
8382
#include <sys/types.h>

src/hotspot/os/posix/os_posix.inline.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
#include "runtime/mutex.hpp"
3131
#include "runtime/os.hpp"
3232

33-
#include <unistd.h>
34-
#include <sys/socket.h>
3533
#include <netdb.h>
34+
#include <sys/socket.h>
35+
#include <unistd.h>
3636

3737
// Aix does not have NUMA support but need these for compilation.
3838
inline bool os::numa_has_group_homing() { AIX_ONLY(ShouldNotReachHere();) return false; }

src/hotspot/os/posix/perfMemory_posix.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,14 @@
4040
#include "os_linux.hpp"
4141
#endif
4242

43-
// put OS-includes here
44-
# include <sys/types.h>
45-
# include <sys/mman.h>
4643
# include <errno.h>
44+
# include <pwd.h>
45+
# include <signal.h>
4746
# include <stdio.h>
48-
# include <unistd.h>
47+
# include <sys/mman.h>
4948
# include <sys/stat.h>
50-
# include <signal.h>
51-
# include <pwd.h>
49+
# include <sys/types.h>
50+
# include <unistd.h>
5251

5352
#if defined(LINUX)
5453
# include <sys/file.h>

src/hotspot/os/posix/safefetch_sigjmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#ifdef SAFEFETCH_METHOD_SIGSETJMP
3333

3434
// For SafeFetch we need POSIX TLS and sigsetjmp/longjmp.
35-
#include <setjmp.h>
3635
#include <pthread.h>
36+
#include <setjmp.h>
3737
static pthread_key_t g_jmpbuf_key;
3838

3939
struct InitTLSKey { InitTLSKey() { pthread_key_create(&g_jmpbuf_key, nullptr); } };

src/hotspot/os/posix/semaphore_posix.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@
2525
#ifndef __APPLE__
2626
#include "os_posix.hpp"
2727
#include "runtime/os.hpp"
28-
#include "utilities/debug.hpp"
2928
// POSIX unnamed semaphores are not supported on OS X.
3029
#include "semaphore_posix.hpp"
30+
#include "utilities/debug.hpp"
31+
3132
#include <semaphore.h>
3233

3334
PosixSemaphore::PosixSemaphore(uint value) {

src/hotspot/os/posix/threadLocalStorage_posix.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
#include "runtime/threadLocalStorage.hpp"
2626
#include "utilities/debug.hpp"
27+
2728
#include <pthread.h>
2829

2930
static pthread_key_t _thread_key;

test/hotspot/jtreg/sources/TestIncludesAreSorted.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public class TestIncludesAreSorted {
4444
*/
4545
private static final String[] HOTSPOT_SOURCES_TO_CHECK = {
4646
"os/linux",
47+
"os/posix",
4748
"share"
4849
};
4950

0 commit comments

Comments
 (0)