Fixed lock transaction to actually return response value.

git-svn-id: svn://svn.linux1394.org/libraw1394/trunk@24 53a565d1-3bb7-0310-b661-cf11e63c67ab
This commit is contained in:
aeb 2000-04-15 00:33:26 +00:00
parent 8aa036c3f4
commit 9812e4136b
3 changed files with 11 additions and 5 deletions

3
NEWS
View File

@ -1,6 +1,9 @@
Version 0.7:
- fixed lock transaction to actually return the required response; these
functions are actually useful now, prototypes for raw1394_start_lock and
raw1394_lock changed
- a void pointer can now be stored as user data with a handle
Version 0.6:

View File

@ -143,7 +143,7 @@ int raw1394_start_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
size_t length, quadlet_t *data, unsigned long tag);
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
quadlet_t arg, unsigned long tag);
quadlet_t arg, quadlet_t *result, unsigned long tag);
/*
* This does the complete transaction and will return when it's finished. It
@ -155,7 +155,8 @@ int raw1394_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
int raw1394_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
size_t length, quadlet_t *data);
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
unsigned int extcode, quadlet_t data, quadlet_t arg);
unsigned int extcode, quadlet_t data, quadlet_t arg,
quadlet_t *result);
/*
* Start and stop receiving a certain isochronous channel. You have to set an

View File

@ -47,7 +47,7 @@ int raw1394_start_write(struct raw1394_handle *handle, nodeid_t node,
int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
quadlet_t arg, unsigned long tag)
quadlet_t arg, quadlet_t *result, unsigned long tag)
{
struct raw1394_request *req = &handle->req;
quadlet_t sendbuf[2];
@ -65,6 +65,7 @@ int raw1394_start_lock(struct raw1394_handle *handle, nodeid_t node,
req->address = ((u_int64_t)node << 48) | addr;
req->sendb = sendbuf;
req->recvb = result;
switch (extcode) {
case 3: /* EXTCODE_FETCH_ADD */
@ -119,11 +120,12 @@ int raw1394_write(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
}
int raw1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
unsigned int extcode, quadlet_t data, quadlet_t arg)
unsigned int extcode, quadlet_t data, quadlet_t arg,
quadlet_t *result)
{
SYNCFUNC_VARS;
err = raw1394_start_lock(handle, node, addr, extcode, data, arg,
err = raw1394_start_lock(handle, node, addr, extcode, data, arg, result,
(unsigned long)&rh);
SYNCFUNC_BODY;