Commit f21a7042 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Apply clang-format to folly/portability/

Summary: [Folly] Apply `clang-format` to `folly/portability/`.

Reviewed By: igorsugak

Differential Revision: D9625664

fbshipit-source-id: fa63f3e3a719c22ea88cd14172d34e360353145f
parent 61276a38
...@@ -25,7 +25,7 @@ namespace detail { ...@@ -25,7 +25,7 @@ namespace detail {
void call_flush_instruction_cache_self_pid(void* begin, size_t size) { void call_flush_instruction_cache_self_pid(void* begin, size_t size) {
FlushInstructionCache(GetCurrentProcess(), begin, size); FlushInstructionCache(GetCurrentProcess(), begin, size);
} }
} } // namespace detail
} } // namespace portability
} } // namespace folly
#endif #endif
...@@ -27,8 +27,8 @@ namespace portability { ...@@ -27,8 +27,8 @@ namespace portability {
namespace detail { namespace detail {
void call_flush_instruction_cache_self_pid(void* begin, size_t size); void call_flush_instruction_cache_self_pid(void* begin, size_t size);
} }
} } // namespace portability
} } // namespace folly
FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) { FOLLY_ALWAYS_INLINE void __builtin___clear_cache(char* begin, char* end) {
if (folly::kIsArchAmd64) { if (folly::kIsArchAmd64) {
......
...@@ -111,7 +111,7 @@ int posix_fallocate(int fd, off_t offset, off_t len) { ...@@ -111,7 +111,7 @@ int posix_fallocate(int fd, off_t offset, off_t len) {
// can't exactly pre-allocate on windows anyways. // can't exactly pre-allocate on windows anyways.
return 0; return 0;
} }
} } // namespace fcntl
} } // namespace portability
} } // namespace folly
#endif #endif
...@@ -48,9 +48,9 @@ int creat(char const* fn, int pm); ...@@ -48,9 +48,9 @@ int creat(char const* fn, int pm);
int fcntl(int fd, int cmd, ...); int fcntl(int fd, int cmd, ...);
int posix_fallocate(int fd, off_t offset, off_t len); int posix_fallocate(int fd, off_t offset, off_t len);
int open(char const* fn, int of, int pm = 0); int open(char const* fn, int of, int pm = 0);
} } // namespace fcntl
} } // namespace portability
} } // namespace folly
/* using override */ using namespace folly::portability::fcntl; /* using override */ using namespace folly::portability::fcntl;
#endif #endif
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
namespace google { namespace google {
class FlagSaver {}; class FlagSaver {};
} } // namespace google
#else #else
#include <gflags/gflags.h> #include <gflags/gflags.h>
......
...@@ -64,7 +64,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) { ...@@ -64,7 +64,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) {
return -1; return -1;
} }
} }
} } // namespace pthread
} } // namespace portability
} } // namespace folly
#endif #endif
...@@ -38,9 +38,9 @@ int pthread_key_create(pthread_key_t* key, void (*destructor)(void*)); ...@@ -38,9 +38,9 @@ int pthread_key_create(pthread_key_t* key, void (*destructor)(void*));
int pthread_key_delete(pthread_key_t key); int pthread_key_delete(pthread_key_t key);
void* pthread_getspecific(pthread_key_t key); void* pthread_getspecific(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void* value); int pthread_setspecific(pthread_key_t key, const void* value);
} } // namespace pthread
} } // namespace portability
} } // namespace folly
/* using override */ using namespace folly::portability::pthread; /* using override */ using namespace folly::portability::pthread;
...@@ -177,5 +177,5 @@ struct hash<pthread_t> { ...@@ -177,5 +177,5 @@ struct hash<pthread_t> {
std::hash<decltype(k.x)>()(k.x); std::hash<decltype(k.x)>()(k.x);
} }
}; };
} } // namespace std
#endif #endif
...@@ -433,7 +433,7 @@ int socketpair(int domain, int type, int protocol, int sv[2]) { ...@@ -433,7 +433,7 @@ int socketpair(int domain, int type, int protocol, int sv[2]) {
sv[1] = _open_osfhandle(pair[1], O_RDWR | O_BINARY); sv[1] = _open_osfhandle(pair[1], O_RDWR | O_BINARY);
return 0; return 0;
} }
} } // namespace sockets
} } // namespace portability
} } // namespace folly
#endif #endif
...@@ -134,8 +134,8 @@ using ::poll; ...@@ -134,8 +134,8 @@ using ::poll;
using ::recv; using ::recv;
using ::recvfrom; using ::recvfrom;
using ::send; using ::send;
using ::sendto;
using ::sendmsg; using ::sendmsg;
using ::sendto;
using ::setsockopt; using ::setsockopt;
using ::shutdown; using ::shutdown;
using ::socket; using ::socket;
......
...@@ -85,7 +85,7 @@ struct MemMapDebugTrailer { ...@@ -85,7 +85,7 @@ struct MemMapDebugTrailer {
size_t length; size_t length;
uint32_t magic; uint32_t magic;
}; };
} } // namespace
void* mmap(void* addr, size_t length, int prot, int flags, int fd, off_t off) { void* mmap(void* addr, size_t length, int prot, int flags, int fd, off_t off) {
// Make sure it's something we support first. // Make sure it's something we support first.
......
...@@ -332,8 +332,8 @@ ssize_t write(int fh, void const* buf, size_t count) { ...@@ -332,8 +332,8 @@ ssize_t write(int fh, void const* buf, size_t count) {
} }
return r; return r;
} }
} } // namespace unistd
} } // namespace portability
} } // namespace folly
#endif #endif
...@@ -86,9 +86,9 @@ long sysconf(int tp); ...@@ -86,9 +86,9 @@ long sysconf(int tp);
int truncate(const char* path, off_t len); int truncate(const char* path, off_t len);
int usleep(unsigned int ms); int usleep(unsigned int ms);
ssize_t write(int fh, void const* buf, size_t count); ssize_t write(int fh, void const* buf, size_t count);
} } // namespace unistd
} } // namespace portability
} } // namespace folly
/* using override */ using namespace folly::portability::unistd; /* using override */ using namespace folly::portability::unistd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment