diff options
author | Sage Weil <sage@inktank.com> | 2013-09-27 21:05:27 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-10-16 09:28:14 -0700 |
commit | 9626aaf43b78c9efd8c32c34fd8c42555be82632 (patch) | |
tree | 4c15eeebf01328673fc0a2c9a6bcf36575761cd5 | |
parent | 36e18ae997700f0b3b06d983d902826f034ac8cd (diff) | |
download | ceph-9626aaf43b78c9efd8c32c34fd8c42555be82632.tar.gz |
common/crc32c: document interface
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/include/crc32c.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/include/crc32c.h b/src/include/crc32c.h index 49d68474d68..a568edabe19 100644 --- a/src/include/crc32c.h +++ b/src/include/crc32c.h @@ -14,8 +14,15 @@ extern ceph_crc32c_func_t ceph_crc32c_func; extern ceph_crc32c_func_t ceph_choose_crc32(void); -/* - * common entry point; use this! +/** + * calculate crc32c + * + * Note: if the data pointer is NULL, we calculate a crc value as if + * it were zero-filled. + * + * @param crc initial value + * @param data pointer to data buffer + * @param length length of buffer */ static inline uint32_t ceph_crc32c(uint32_t crc, unsigned char const *data, unsigned length) { |