-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[contrib][linux] Add zstd_common module
The zstd_common module was added upstream in commit torvalds/linux@637a642. But the kernel specific code was inlined into the library. This commit switches it to use the out of line method that we use for the other modules.
- Loading branch information
Showing
3 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause | ||
/* | ||
* Copyright (c) Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under both the BSD-style license (found in the | ||
* LICENSE file in the root directory of this source tree) and the GPLv2 (found | ||
* in the COPYING file in the root directory of this source tree). | ||
* You may select, at your option, one of the above-listed licenses. | ||
*/ | ||
|
||
#include <linux/module.h> | ||
|
||
#include "common/huf.h" | ||
#include "common/fse.h" | ||
#include "common/zstd_internal.h" | ||
|
||
// Export symbols shared by compress and decompress into a common module | ||
|
||
#undef ZSTD_isError /* defined within zstd_internal.h */ | ||
EXPORT_SYMBOL_GPL(FSE_readNCount); | ||
EXPORT_SYMBOL_GPL(HUF_readStats); | ||
EXPORT_SYMBOL_GPL(HUF_readStats_wksp); | ||
EXPORT_SYMBOL_GPL(ZSTD_isError); | ||
EXPORT_SYMBOL_GPL(ZSTD_getErrorName); | ||
EXPORT_SYMBOL_GPL(ZSTD_getErrorCode); | ||
EXPORT_SYMBOL_GPL(ZSTD_customMalloc); | ||
EXPORT_SYMBOL_GPL(ZSTD_customCalloc); | ||
EXPORT_SYMBOL_GPL(ZSTD_customFree); | ||
|
||
MODULE_LICENSE("Dual BSD/GPL"); | ||
MODULE_DESCRIPTION("Zstd Common"); |