1PMEM2_SOURCE_GET_HANDLE(3) PMDK Programmer's Manual PMEM2_SOURCE_GET_HANDLE(3)
2
3
4

NAME

6       pmem2_source_get_handle() - reads file handler of the data source
7

SYNOPSIS

9              #include <libpmem2.h>
10
11              int pmem2_source_get_handle(const struct pmem2_source *src, HANDLE *h);
12

DESCRIPTION

14       The  pmem2_source_get_handle()  function  reads  the  file  handler  of
15       *struct pmem2_source** object describing the data source and returns it
16       by h parameter.
17
18       This function is Windows only, on Linux use pmem2_source_get_fd(3).  If
19       the   source   was   created   using    pmem2_source_from_fd(3)    then
20       pmem2_source_get_handle()  is  also valid function to read handler, be‐
21       cause file descriptor is converted to file handle  during  source  cre‐
22       ation.
23
24       However, there are limitations to what you can do with a handle created
25       from a file descriptor.  For details refer to  DESCRIPTION  section  in
26       the pmem2_source_from_fd(3) manpage.
27

ERRORS

29       The pmem2_source_get_handle() can fail with the following errors:
30
31PMEM2_E_FILE_HANDLE_NOT_SET  -  in  case  of  an  instance  of struct
32         pmem2_source that does not come from source type  that  support  file
33         handles, eg.  anonymous data source.
34

RETURN VALUE

36       The pmem2_source_get_handle() returns a file handle of data source.
37

SEE ALSO

39       pmem2_source_from_fd(3),    pmem2_source_get_fd(3),   libpmem2(7)   and
40       <https://pmem.io>
41
42
43
44PMDK - pmem2 API version 1.0      2022-05-24        PMEM2_SOURCE_GET_HANDLE(3)
Impressum