Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_kmod.c Create Date:2022-07-28 06:34:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:test_dev_config_update_uint_sync

Proto:static int test_dev_config_update_uint_sync(struct kmod_test_device *test_dev, const char *buf, size_t size, unsigned int *config, int (*test_sync)(struct kmod_test_device *test_dev))

Type:int

Parameter:

TypeParameterName
struct kmod_test_device *test_dev
const char *buf
size_tsize
unsigned int *config
int (*test_sync
883  ret = kstrtoul - convert a string to an unsigned long*@s: The start of the string. The string must be null-terminated, and may also* include a single newline before its terminating null. The first character* may also be a plus sign, but not a minus sign.
884  If ret Then Return ret
887  If new > UINT_MAX Then Return -EINVAL
890  mutex_lock( & config_mutex)
892  old_val = config
893  config = new
895  ret = test_sync(test_dev)
896  If ret Then
897  config = old_val
899  ret = test_sync(test_dev)
900  WARN_ON(ret)
902  mutex_unlock( & config_mutex)
903  Return -EINVAL
906  mutex_unlock( & config_mutex)
908  Return size
Caller
NameDescribe
config_num_threads_store