[Xcb] [xsync] attributes of XCBSyncCreateAlarm

Vincent Torri vtorri at univ-evry.fr
Sat Jul 22 12:33:02 PDT 2006


Hey,

a question about that function again.

I suppose that I have defined the flags for the attributes of 
XCBSyncCreateAlarm. Now I need to set the values of value_list, which is a 
pointer on a CARD32.

I suppose that I want to set the value of all the 6 attributes. My 
question is :

should value_list be of type

CARD32 value_list[6]
because there are 6 values,

or of type a pointer on the following structure:

struct {
   XCBSyncTRIGGER trigger;
   XCBSyncINT64   delta;
   BOOL           events;
}
and after that, I cast to a pointer on CARD32

?

thank you

Vincent

>> file of the extension. I don't see any in the sync.h file.
>>
>> According to the doc of the sync protocol, the attributes of
>> XCBSyncCreateAlarm are:
>>
>> trigger: of type TRIGGER (counter, value-type, value, test-type)
>> delta  : of type int64
>> events : of type bool
>>
>> so, how can i use attributes with XCBSyncCreateAlarm ?
>>
>> thank you
>>
>> Vincent
>
> Indeed, I think these defines from xextproto/sync.h are missing:
>
> /*
> * Flags for Alarm Attributes
> */
> #define XSyncCACounter (1L<<0)
> #define XSyncCAValueType (1L<<1)
> #define XSyncCAValue (1L<<2)
> #define XSyncCATestType (1L<<3)
> #define XSyncCADelta (1L<<4)
> #define XSyncCAEvents (1L<<5)
>
> xcb-proto/src/extensions/sync.xml should be patched like this:
>
>  <enum name="CA">
>    <item name="Counter"><bit>0</bit></item>
>    ... etc. ...
>  </enum>
>
> Also, I notice that some of the field types of the structs refer to the enumeration names instead of CARD8/16/32. What size do these end up in the structure definitions? C enums don't actually specify a physical size, so these might be incorrect compared to the wire protocol (xextproto/syncstr.h).
>
> These are a few of the reasons why I wouldn't consider any of the xcb-proto work finished and releasable until we have working test code exercising every bit of it.
>
> Ian
>
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
>
> -- 
> Ce message a été vérifié par MailScanner
> pour des virus ou des polluriels et rien de
> suspect n'a été trouvé.
> Message délivré par le serveur de messagerie de l'Université d'Evry.
>
>


More information about the Xcb mailing list