summaryrefslogtreecommitdiff
path: root/libfec
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2024-01-04 11:07:02 -0800
committerKelvin Zhang <zhangkelvin@google.com>2024-01-04 11:08:28 -0800
commit52fa306896a9a54d652a9311c26bbe50e003e9fb (patch)
treef5c996f556685923850baa9e4f1563e907d4984a /libfec
parentc88f7159b5c5af8765256767d00389216856a52f (diff)
downloadextras-52fa306896a9a54d652a9311c26bbe50e003e9fb.tar.gz
Remove unused mutex fields
The mutex usage is removed in aosp/179410 , we can safely remove the mutex fields now. Test: th Bug: 318078616 Change-Id: Id22e8eab9c8cb6cc24fcbf9e32d222ba6d11cb84
Diffstat (limited to 'libfec')
-rw-r--r--libfec/fec_open.cpp7
-rw-r--r--libfec/fec_private.h3
2 files changed, 1 insertions, 9 deletions
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index 175207b8..6825942b 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -418,8 +418,6 @@ int fec_close(struct fec_handle *f)
close(f->fd);
}
- pthread_mutex_destroy(&f->mutex);
-
reset_handle(f);
delete f;
@@ -528,11 +526,6 @@ int fec_open(struct fec_handle **handle, const char *path, int mode, int flags,
f->ecc.rsn = FEC_RSM - roots;
f->flags = flags;
- if (unlikely(pthread_mutex_init(&f->mutex, NULL) != 0)) {
- error("failed to create a mutex: %s", strerror(errno));
- return -1;
- }
-
f->fd = TEMP_FAILURE_RETRY(open(path, mode | O_CLOEXEC));
if (f->fd == -1) {
diff --git a/libfec/fec_private.h b/libfec/fec_private.h
index 199f8017..0c633223 100644
--- a/libfec/fec_private.h
+++ b/libfec/fec_private.h
@@ -135,8 +135,7 @@ struct fec_handle {
ecc_info ecc;
int fd;
int flags; /* additional flags passed to fec_open */
- int mode; /* mode for open(2) */
- pthread_mutex_t mutex;
+ int mode; /* mode for open(2) */
uint64_t errors;
uint64_t data_size;
uint64_t pos;