When a function modifies data it is the responsibility of this function to inform others, via the contig registration scheme, of this change. At the time of notification the data on disk and in memory should be consistent (ie that check_database should not fail). To illustrate this, when joining two contigs we should not start sending notifications until we've recomputed the lengths and left/right neighbours of the joined contig.
To send a request, one of the notification functions should be used. The
simplest of these is
contig_notify. This function takes a GapIO
pointer, a contig number, and a reg_data pointer as arguments. The
reg_data is the union of notification types outlined in the above
sections. The separate steps for notifying are:
contig_notifywith the GapIO, contig number and notification structure. The notification structure should be cast back to a pointer to the reg_data union type.
An example illustrating the above steps would be:
reg_length jl; [...] jl.job = REG_LENGTH; jl.length = some_length; contig_notify(io, contig_number, (reg_data *)&jl);
The available notification functions are
See section C Functions Available.