Blame source/vdo/kernel/instanceNumber.h

Packit Service 310c69
/*
Packit Service 310c69
 * Copyright (c) 2020 Red Hat, Inc.
Packit Service 310c69
 *
Packit Service 310c69
 * This program is free software; you can redistribute it and/or
Packit Service 310c69
 * modify it under the terms of the GNU General Public License
Packit Service 310c69
 * as published by the Free Software Foundation; either version 2
Packit Service 310c69
 * of the License, or (at your option) any later version.
Packit Service 310c69
 * 
Packit Service 310c69
 * This program is distributed in the hope that it will be useful,
Packit Service 310c69
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 310c69
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 310c69
 * GNU General Public License for more details.
Packit Service 310c69
 * 
Packit Service 310c69
 * You should have received a copy of the GNU General Public License
Packit Service 310c69
 * along with this program; if not, write to the Free Software
Packit Service 310c69
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
Packit Service 310c69
 * 02110-1301, USA. 
Packit Service 310c69
 *
Packit Service 75d76b
 * $Id: //eng/vdo-releases/aluminum/src/c++/vdo/kernel/instanceNumber.h#1 $
Packit Service 310c69
 */
Packit Service 310c69
Packit Service 310c69
/**
Packit Service 75d76b
 * Allocate an instance number.
Packit Service 310c69
 *
Packit Service 75d76b
 * @param [out] instancePtr  An integer to hold the allocated instance number
Packit Service 310c69
 *
Packit Service 75d76b
 * @result  UDS_SUCCESS or an error code
Packit Service 310c69
 **/
Packit Service 75d76b
int allocateKVDOInstance(unsigned int *instancePtr);
Packit Service 310c69
Packit Service 310c69
/**
Packit Service 75d76b
 * Release an instance number previously allocated.
Packit Service 310c69
 *
Packit Service 75d76b
 * @param instance  The instance number to release
Packit Service 310c69
 **/
Packit Service 75d76b
void releaseKVDOInstance(unsigned int instance);
Packit Service 310c69
Packit Service 310c69
/**
Packit Service 75d76b
 * Initialize the instance-number tracking data structures.
Packit Service 310c69
 **/
Packit Service 75d76b
void initializeInstanceNumberTracking(void);
Packit Service 310c69
Packit Service 310c69
/**
Packit Service 75d76b
 * Free up the instance-number tracking data structures.
Packit Service 310c69
 **/
Packit Service 75d76b
void cleanUpInstanceNumberTracking(void);