Programming with CCDS consists of issuing calls to the CCDS programming library functions. The following example show how to get started.
The program in figure 2 accesses the data space given by the -session argument in argv[], then opens the file myfile for reading and writing with a local file offset pointer. If myfile does not exist in the data space, then it is created. See also ccds_open in appendix A. The first 11 bytes segment of myfile is locked, and a message is written. Finally, myfile is unimported to a file named test.
An example makefile to make this program is shown in figure 3.
The program in figure 4 shows how to enable the notification feature of CCDS.
Figure 2: Example CCDS C program
Figure 4: Example CCDS C program