Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fml
unique_fd.cc
Go to the documentation of this file.
1
// Copyright 2013 The Flutter Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#include "flutter/fml/unique_fd.h"
6
7
#include "flutter/fml/eintr_wrapper.h"
8
9
namespace
fml
{
10
namespace
internal {
11
12
#if FML_OS_WIN
13
14
namespace
os_win {
15
16
std::mutex UniqueFDTraits::file_map_mutex;
17
std::map<HANDLE, DirCacheEntry> UniqueFDTraits::file_map;
18
19
void
UniqueFDTraits::Free_Handle(
HANDLE
fd) {
20
CloseHandle(fd);
21
}
22
23
}
// namespace os_win
24
25
#else
// FML_OS_WIN
26
27
namespace
os_unix {
28
29
void
UniqueFDTraits::Free
(
int
fd) {
30
close(fd);
31
}
32
33
void
UniqueDirTraits::Free
(DIR* dir) {
34
closedir(dir);
35
}
36
37
}
// namespace os_unix
38
39
#endif
// FML_OS_WIN
40
41
}
// namespace internal
42
}
// namespace fml
fml
Definition
ascii_trie.cc:9
fml::internal::os_unix::UniqueDirTraits::Free
static void Free(DIR *dir)
Definition
unique_fd.cc:33
fml::internal::os_unix::UniqueFDTraits::Free
static void Free(int fd)
Definition
unique_fd.cc:29
HANDLE
void * HANDLE
Definition
windows_types.h:36
Generated on Fri Apr 26 2024 06:14:06 for Flutter Engine by
1.9.8