Skip to content

Commit

Permalink
pmem2: set async as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
wlemkows committed Mar 14, 2023
1 parent 6d326ad commit d484df3
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Libraries available in this repository:

- [libpmem2](https://pmem.io/pmdk/libpmem2/): provides low level persistent memory support, is a new version of libpmem.

> NOTICE:
Support for async functions is deprecated since PMDK 1.13.0 release
and will be removed in the PMDK 1.14.0 release along with the miniasync dependency.

- [libpmemobj](https://pmem.io/pmdk/libpmemobj/): provides a transactional object store, providing memory allocation, transactions, and general facilities for persistent memory programming.

- [libpmemblk](https://pmem.io/pmdk/libpmemblk/): supports arrays of pmem-resident blocks, all the same size, that are atomically updated.
Expand Down
7 changes: 6 additions & 1 deletion doc/libpmem2/pmem2_async.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ header: "pmem2 API version 1.0"
[SEE ALSO](#see-also)<br />

# NAME #
**pmem2_config_set_vdm**(), **pmem2_memcpy_async**(), **pmem2_memmove_async**(), **pmem2_memset_async**() - asynchronous data movement operations
**pmem2_config_set_vdm**()(DEPRECATED), **pmem2_memcpy_async**()(DEPRECATED), **pmem2_memmove_async**()(DEPRECATED),
**pmem2_memset_async**()(DEPRECATED) - asynchronous data movement operations

> NOTICE:
Support for async functions is deprecated since PMDK 1.13.0 release
and will be removed in the PMDK 1.14.0 release along with the miniasync dependency.

# SYNOPSIS #

Expand Down
3 changes: 3 additions & 0 deletions src/deps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ Use git sub-tree to pull changes for the pmem/miniasync repository.
This copy is intended to be removed when miniasync will be released,
and uploaded to the vcpkg repository.

> NOTICE:
Support for async functions is deprecated since PMDK 1.13.0 release
and will be removed in the PMDK 1.14.0 release along with the miniasync dependency.
13 changes: 12 additions & 1 deletion src/include/libpmem2/async.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: BSD-3-Clause */
/* Copyright 2022, Intel Corporation */
/* Copyright 2022-2023, Intel Corporation */

/*
* libpmem2/async.h -- definitions of libpmem2 functions and structs for
Expand All @@ -18,6 +18,14 @@
extern "C" {
#endif

#define ASYNC_DEPR_STR "Async support for libpmem2 is deprecated."
#ifdef _WIN32
#define ASYNC_DEPR_ATTR __declspec(deprecated(ASYNC_DEPR_STR))
#else
#define ASYNC_DEPR_ATTR __attribute__((deprecated(ASYNC_DEPR_STR)))
#endif

ASYNC_DEPR_ATTR
int pmem2_config_set_vdm(struct pmem2_config *cfg, struct vdm *vdm);

/*
Expand Down Expand Up @@ -104,12 +112,15 @@ struct pmem2_future_output {
FUTURE(pmem2_future, struct pmem2_future_data,
struct pmem2_future_output);

ASYNC_DEPR_ATTR
struct pmem2_future pmem2_memcpy_async(struct pmem2_map *map,
void *pmemdest, const void *src, size_t len, unsigned flags);

ASYNC_DEPR_ATTR
struct pmem2_future pmem2_memmove_async(struct pmem2_map *map,
void *pmemdest, const void *src, size_t len, unsigned flags);

ASYNC_DEPR_ATTR
struct pmem2_future pmem2_memset_async(struct pmem2_map *map,
void *str, int c, size_t n, unsigned flags);

Expand Down
7 changes: 6 additions & 1 deletion src/test/pmem2_future/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2022, Intel Corporation
# Copyright 2022-2023, Intel Corporation
#

#
Expand All @@ -19,3 +19,8 @@ OBJS = pmem2_future.o\
LIBPMEM2=y
LIBMINIASYNC=y
include ../Makefile.inc

# Miniasync support is deprecated.
# This flag allows to build tests, examples and benchmarks
# using miniasync despite the deprecated state.
CFLAGS += -Wno-deprecated-declarations
7 changes: 6 additions & 1 deletion src/test/pmem2_mover/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2022, Intel Corporation
# Copyright 2022-2023, Intel Corporation

#
# src/test/pmem2_mover/Makefile -- build pmem2_mover test
Expand All @@ -18,3 +18,8 @@ OBJS = pmem2_mover.o\
LIBPMEM2=y
LIBMINIASYNC=y
include ../Makefile.inc

# Miniasync support is deprecated.
# This flag allows to build tests, examples and benchmarks
# using miniasync despite the deprecated state.
CFLAGS += -Wno-deprecated-declarations

0 comments on commit d484df3

Please sign in to comment.