fuse.h (18b18078f267ba10cf14348bc333f2f81818f472) | fuse.h (7e4844f7d9546ba65202fbe834d1c06aa72a37b8) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2007-2009 Google Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 145 unchanged lines hidden (view full) --- 154#define RECTIFY_TDCR(td, cred) \ 155do { \ 156 if (! (td)) \ 157 (td) = curthread; \ 158 if (! (cred)) \ 159 (cred) = (td)->td_ucred; \ 160} while (0) 161 | 1/*- 2 * SPDX-License-Identifier: BSD-3-Clause 3 * 4 * Copyright (c) 2007-2009 Google Inc. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are --- 145 unchanged lines hidden (view full) --- 154#define RECTIFY_TDCR(td, cred) \ 155do { \ 156 if (! (td)) \ 157 (td) = curthread; \ 158 if (! (cred)) \ 159 (cred) = (td)->td_ucred; \ 160} while (0) 161 |
162/* Debug related stuff */ | 162#define fuse_lck_mtx_lock(mtx) mtx_lock(&(mtx)) 163#define fuse_lck_mtx_unlock(mtx) mtx_unlock(&(mtx)) |
163 | 164 |
164#ifndef FUSE_DEBUG_DEVICE 165#define FUSE_DEBUG_DEVICE 0 166#endif 167 168#ifndef FUSE_DEBUG_FILE 169#define FUSE_DEBUG_FILE 0 170#endif 171 172#ifndef FUSE_DEBUG_INTERNAL 173#define FUSE_DEBUG_INTERNAL 0 174#endif 175 176#ifndef FUSE_DEBUG_IO 177#define FUSE_DEBUG_IO 0 178#endif 179 180#ifndef FUSE_DEBUG_IPC 181#define FUSE_DEBUG_IPC 0 182#endif 183 184#ifndef FUSE_DEBUG_LOCK 185#define FUSE_DEBUG_LOCK 0 186#endif 187 188#ifndef FUSE_DEBUG_VFSOPS 189#define FUSE_DEBUG_VFSOPS 0 190#endif 191 192#ifndef FUSE_DEBUG_VNOPS 193#define FUSE_DEBUG_VNOPS 0 194#endif 195 196#ifndef FUSE_TRACE 197#define FUSE_TRACE 0 198#endif 199 200#define DEBUGX(cond, fmt, ...) do { \ 201 if (((cond))) { \ 202 printf("%s: " fmt, __func__, ## __VA_ARGS__); \ 203 } \ 204} while (0) 205 206#define fuse_lck_mtx_lock(mtx) do { \ 207 DEBUGX(FUSE_DEBUG_LOCK, "0: lock(%s): %s@%d by %d\n", \ 208 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \ 209 mtx_lock(&(mtx)); \ 210 DEBUGX(FUSE_DEBUG_LOCK, "1: lock(%s): %s@%d by %d\n", \ 211 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \ 212} while (0) 213 214#define fuse_lck_mtx_unlock(mtx) do { \ 215 DEBUGX(FUSE_DEBUG_LOCK, "0: unlock(%s): %s@%d by %d\n", \ 216 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \ 217 mtx_unlock(&(mtx)); \ 218 DEBUGX(FUSE_DEBUG_LOCK, "1: unlock(%s): %s@%d by %d\n", \ 219 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \ 220} while (0) 221 | |
222void fuse_ipc_init(void); 223void fuse_ipc_destroy(void); 224 225int fuse_device_init(void); 226void fuse_device_destroy(void); | 165void fuse_ipc_init(void); 166void fuse_ipc_destroy(void); 167 168int fuse_device_init(void); 169void fuse_device_destroy(void); |