[Sound-open-firmware] [RFC PATCH v2 3/8] dma: ops: introduce num_channels_busy to get number of busy channels in DMAC
Ranjani Sridharan
ranjani.sridharan at linux.intel.com
Fri Jun 8 17:51:04 CEST 2018
On Fri, 2018-06-08 at 09:32 +0100, Liam Girdwood wrote:
> On Fri, 2018-06-08 at 00:51 -0700, Ranjani Sridharan wrote:
> > > >
> > > > + /* atomically increment num channels in use */
> > > > + __sync_fetch_and_add(&dma->num_channels_busy,
> > > > 1);
> > >
> > > Cant see where this is defined so this wont compile ? Please see
> > > arch/atomic.h
> > > for atomic arithmetic.
> >
> > I have a question here:
> >
> > Can I cast a uint32_t * to atomic_t * and then pass it to the
> > atomic_add() function? Will it still be a atomic operation?
>
> Why do you need to do this ? atomic_t can be used like a uint32_t
> within your
> code already.
OK, thats what I thought too but just wanted to confirm. Thanks!
>
> Liam
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
More information about the Sound-open-firmware
mailing list