Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  *  sw_sync abstraction
0003  *
0004  *  Copyright 2015-2016 Collabora Ltd.
0005  *
0006  *  Based on the implementation from the Android Open Source Project,
0007  *
0008  *  Copyright 2013 Google, Inc
0009  *
0010  *  Permission is hereby granted, free of charge, to any person obtaining a
0011  *  copy of this software and associated documentation files (the "Software"),
0012  *  to deal in the Software without restriction, including without limitation
0013  *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
0014  *  and/or sell copies of the Software, and to permit persons to whom the
0015  *  Software is furnished to do so, subject to the following conditions:
0016  *
0017  *  The above copyright notice and this permission notice shall be included in
0018  *  all copies or substantial portions of the Software.
0019  *
0020  *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0021  *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0022  *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
0023  *  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
0024  *  OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0025  *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0026  *  OTHER DEALINGS IN THE SOFTWARE.
0027  */
0028 
0029 #ifndef SELFTESTS_SW_SYNC_H
0030 #define SELFTESTS_SW_SYNC_H
0031 
0032 /*
0033  * sw_sync is mainly intended for testing and should not be compiled into
0034  * production kernels
0035  */
0036 
0037 int sw_sync_timeline_create(void);
0038 int sw_sync_timeline_is_valid(int fd);
0039 int sw_sync_timeline_inc(int fd, unsigned int count);
0040 void sw_sync_timeline_destroy(int fd);
0041 
0042 int sw_sync_fence_create(int fd, const char *name, unsigned int value);
0043 int sw_sync_fence_is_valid(int fd);
0044 void sw_sync_fence_destroy(int fd);
0045 
0046 #endif