citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

os.h (1418B)


      1 /*
      2  * Copyright (c) 2017 Kyle Milz <kyle@0x30.net>
      3  *
      4  * Permission to use, copy, modify, and distribute this software for any
      5  * purpose with or without fee is hereby granted, provided that the above
      6  * copyright notice and this permission notice appear in all copies.
      7  *
      8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
      9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
     10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
     11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
     12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
     13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
     14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
     15  */
     16 
     17 
     18 /*
     19  * Extend the length of the file descriptor given by the first argument by at
     20  * least the number of bytes given as the second argument.
     21  *
     22  * Returns a pointer to the beginning of the newly allocated region on success.
     23  */
     24 void	*citrun_extend(int, size_t);
     25 
     26 /*
     27  * Creates a new file, opens it and returns the descriptor.
     28  * Returns the descriptor number on success.
     29  */
     30 int	 citrun_open_fd();
     31 
     32 /*
     33  * Takes a pointer to `struct citrun_header` and fills in as many header fields
     34  * as possible.
     35  */
     36 void	 citrun_os_info(struct citrun_header *);
     37 
     38 /*
     39  * If no lock file exists, a viewer is started.
     40  */
     41 void	 citrun_start_viewer();