[Openib-windows] RE: [PATCH] reregister\cl_vecto\reg_svc

Fab Tillier ftillier at silverstorm.com
Wed Sep 14 11:52:08 PDT 2005


> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Wednesday, September 14, 2005 7:23 AM
> 
> Attach patch the include the follow:
> 2. bug in cl_vectoe_get function -
>         /* Get a pointer to the element. */
>         p_src = cl_vector_get_ptr( p_vector, index );
> -       p_vector->pfn_copy( p_src, p_element, p_vector->element_size );
> +       p_vector->pfn_copy( p_element, p_src, p_vector->element_size );
> 
> 

In the future, if you can make these discrete patches that would help.

I applied the changes to complib (this and the additional asserts in the cl_obj
lock/unlock functions).

I'll be applying the rest shortly, with minor changes (stay tuned for comments).

This is checked in as revision 66.

Thanks!

- Fab

Index: inc/complib/cl_vector.h
===================================================================
--- inc/complib/cl_vector.h (revision 64)
+++ inc/complib/cl_vector.h (working copy)
@@ -625,7 +625,7 @@
 
    /* Get a pointer to the element. */
    p_src = cl_vector_get_ptr( p_vector, index );
-   p_vector->pfn_copy( p_src, p_element, p_vector->element_size );
+   p_vector->pfn_copy( p_element, p_src, p_vector->element_size );
 }
 /*
 * PARAMETERS
Index: inc/complib/cl_obj.h
===================================================================
--- inc/complib/cl_obj.h    (revision 64)
+++ inc/complib/cl_obj.h    (working copy)
@@ -699,6 +699,8 @@
 cl_obj_lock(
    IN              cl_obj_t * const            p_obj )
 {
+   CL_ASSERT( p_obj->state == CL_INITIALIZED ||
+       p_obj->state == CL_DESTROYING );
    cl_spinlock_acquire( &p_obj->lock );
 }
 /*
@@ -727,6 +729,8 @@
 cl_obj_unlock(
    IN              cl_obj_t * const            p_obj )
 {
+   CL_ASSERT( p_obj->state == CL_INITIALIZED ||
+       p_obj->state == CL_DESTROYING );
    cl_spinlock_release( &p_obj->lock );
 }
 /*




More information about the ofw mailing list