> +    nesupd->udoorbell = mmap(NULL, page_size, PROT_WRITE | PROT_READ, 
 > MAP_SHARED,
 > +                    context->cmd_fd, nesupd->db_index * page_size);
 > +
 > +    if (((void *)-1) == nesupd->udoorbell) {

probably cleaner to test against MAP_FAILED here.

 > +                    asm __volatile__("": : :"memory");

This is insufficient on architectures with weak memory ordering; you
probably want mb() from <infiniband/arch.h>.
_______________________________________________
ewg mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg

Reply via email to