On Wed, Jun 27, 2012 at 12:08:33AM +0200, Łukasz Kuryło wrote: > > > > - if (!mutex_trylock(&dev->struct_mutex)) > > - return -EBUSY; > > + mutex_lock(&dev->struct_mutex); > > > > i915_gem_reset(dev); > > > > But ... the original code: > > Correct me if I'm wrong. > In every manual I've found mutex_trylock(...) returns 0 on success. > So
Qoting the kernel doc for mutex_trylock: "Try to acquire the mutex atomically. Returns 1 if the mutex has been acquired successfully, and 0 on contention." Also, it's open-source, so you could double-check the implementation ... -Daniel -- Daniel Vetter Mail: dan...@ffwll.ch Mobile: +41 (0)79 365 57 48 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx