MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / device_construct

Function device_construct

TactilityKernel/source/device.cpp:61–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59#define unlock_internal(internal) mutex_unlock(&internal->mutex)
60
61error_t device_construct(Device* device) {
62 device->internal = new(std::nothrow) DeviceInternal;
63 if (device->internal == nullptr) {
64 return ERROR_OUT_OF_MEMORY;
65 }
66 LOG_D(TAG, "construct %s", device->name);
67 mutex_construct(&device->internal->mutex);
68 return ERROR_NONE;
69}
70
71error_t device_destruct(Device* device) {
72 lock_internal(device->internal);

Callers 5

DeviceTest.cppFile · 0.85
create_child_deviceFunction · 0.85
device_construct_addFunction · 0.85
createKernelDeviceHolderFunction · 0.85

Calls 1

mutex_constructFunction · 0.85

Tested by

no test coverage detected