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 {
void call_flush_instruction_cache_self_pid(void* begin, size_t size) {
FlushInstructionCache(GetCurrentProcess(), begin, size);
}
}
}
}
} // namespace detail
} // namespace portability
} // namespace folly
#endif
......@@ -27,8 +27,8 @@ namespace portability {
namespace detail {
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) {
if (folly::kIsArchAmd64) {
......
......@@ -111,7 +111,7 @@ int posix_fallocate(int fd, off_t offset, off_t len) {
// can't exactly pre-allocate on windows anyways.
return 0;
}
}
}
}
} // namespace fcntl
} // namespace portability
} // namespace folly
#endif
......@@ -48,9 +48,9 @@ int creat(char const* fn, int pm);
int fcntl(int fd, int cmd, ...);
int posix_fallocate(int fd, off_t offset, off_t len);
int open(char const* fn, int of, int pm = 0);
}
}
}
} // namespace fcntl
} // namespace portability
} // namespace folly
/* using override */ using namespace folly::portability::fcntl;
#endif
......@@ -64,7 +64,7 @@
namespace google {
class FlagSaver {};
}
} // namespace google
#else
#include <gflags/gflags.h>
......
......@@ -64,7 +64,7 @@ int pthread_setspecific(pthread_key_t key, const void* value) {
return -1;
}
}
}
}
}
} // namespace pthread
} // namespace portability
} // namespace folly
#endif
......@@ -38,9 +38,9 @@ int pthread_key_create(pthread_key_t* key, void (*destructor)(void*));
int pthread_key_delete(pthread_key_t key);
void* pthread_getspecific(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void* value);
}
}
}
} // namespace pthread
} // namespace portability
} // namespace folly
/* using override */ using namespace folly::portability::pthread;
......@@ -177,5 +177,5 @@ struct hash<pthread_t> {
std::hash<decltype(k.x)>()(k.x);
}
};
}
} // namespace std
#endif
......@@ -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);
return 0;
}
}
}
}
} // namespace sockets
} // namespace portability
} // namespace folly
#endif
......@@ -134,8 +134,8 @@ using ::poll;
using ::recv;
using ::recvfrom;
using ::send;
using ::sendto;
using ::sendmsg;
using ::sendto;
using ::setsockopt;
using ::shutdown;
using ::socket;
......
......@@ -85,7 +85,7 @@ struct MemMapDebugTrailer {
size_t length;
uint32_t magic;
};
}
} // namespace
void* mmap(void* addr, size_t length, int prot, int flags, int fd, off_t off) {
// Make sure it's something we support first.
......
......@@ -332,8 +332,8 @@ ssize_t write(int fh, void const* buf, size_t count) {
}
return r;
}
}
}
}
} // namespace unistd
} // namespace portability
} // namespace folly
#endif
......@@ -86,9 +86,9 @@ long sysconf(int tp);
int truncate(const char* path, off_t len);
int usleep(unsigned int ms);
ssize_t write(int fh, void const* buf, size_t count);
}
}
}
} // namespace unistd
} // namespace portability
} // namespace folly
/* 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