Bug 1045

Summary: ddx.txt doesn't reflect the current policy for GC wrappers
Product: xorg Reporter: Eric Anholt <eric>
Component: DocumentationAssignee: Eric Anholt <eric>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: git   
Hardware: x86 (IA32)   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 3643    
Attachments:
Description Flags
Proposed patch for documentation none

Description Eric Anholt 2004-08-11 15:03:34 UTC
The current policy for GC wrappers, as keithp explained it to me, is:

The contents of GC funcs/ops vectors (the structs) may not change after they are
in use, i.e. CreateGC.
GC funcs may change the funcs and ops vectors (the pointers) for the GC.
GC ops may change the ops vectors for the GC.

Because of this, the rule for GC wrapping is:

In a GC func, unwrap funcs and ops, call down, pull funcs and ops back out of
the GC (to maintain the wrapping chain if the call down resulted in
modification), and rewrap funcs and ops.
In a GC op, unwrap ops, call down, pull ops back out, and rewrap ops.

The documentation in section 5.8.2 of the DDX document seems both ambiguous and
not in line with this policy, and needs to be updated.
Comment 1 Adam Jackson 2005-07-03 16:09:45 UTC
doc blocker
Comment 2 Eric Anholt 2005-08-24 18:48:48 UTC
Created attachment 3023 [details] [review]
Proposed patch for documentation
Comment 3 Eric Anholt 2005-08-24 19:43:56 UTC
Patch committed.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.