|
|
| Next: Check out this great site! |
| Author |
Message |
dbtouch External

Since: Jun 22, 2009 Posts: 3
|
Posted: Mon Jun 22, 2009 12:59 pm Post subject: declaration of memory barrier function Archived from groups: comp>os>linux>development>apps (more info?) |
|
|
Dear Linux Programmers,
I am using fedora 10 with version of 2.6.27.5-117.fc10.x86_64 #1 SMP.
I am looking for the system head file where memory barrier functions
are declared.
Thanks,
dbtouch |
|
| Back to top |
|
 |
David Schwartz External

Since: Apr 29, 2007 Posts: 57
|
Posted: Mon Jun 22, 2009 4:21 pm Post subject: Re: declaration of memory barrier function [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Jun 22, 12:59 pm, dbtouch <dbto... DeleteThis @gmail.com> wrote:
> Dear Linux Programmers,
>
> I am using fedora 10 with version of 2.6.27.5-117.fc10.x86_64 #1 SMP.
> I am looking for the system head file where memory barrier functions
> are declared.
>
> Thanks,
>
> dbtouch
There is no memory barrier API provided by default. If you want one,
you have to code it. On x86-64, this is sufficient:
#define membar() __asm__ __volatile__("" : : : "memory")
DS |
|
| Back to top |
|
 |
dbtouch External

Since: Jun 22, 2009 Posts: 3
|
Posted: Mon Jun 22, 2009 6:14 pm Post subject: Re: declaration of memory barrier function [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Jun 22, 7:21 pm, David Schwartz <dav....RemoveThis@webmaster.com> wrote:
> On Jun 22, 12:59 pm, dbtouch <dbto....RemoveThis@gmail.com> wrote:
>
> > Dear Linux Programmers,
>
> > I am using fedora 10 with version of 2.6.27.5-117.fc10.x86_64 #1 SMP.
> > I am looking for the system head file where memory barrier functions
> > are declared.
>
> > Thanks,
>
> > dbtouch
>
> There is no memory barrier API provided by default. If you want one,
> you have to code it. On x86-64, this is sufficient:
>
> #define membar() __asm__ __volatile__("" : : : "memory")
>
> DS
Hi, DS
Thanks.
What about smp_mb() mentioned in this article? Where I can find its
definition?
http://www.linuxjournal.com/article/8212 |
|
| Back to top |
|
 |
David Schwartz External

Since: Apr 29, 2007 Posts: 57
|
Posted: Mon Jun 22, 2009 6:33 pm Post subject: Re: declaration of memory barrier function [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Jun 22, 6:14 pm, dbtouch <dbto....TakeThisOut@gmail.com> wrote:
> What about smp_mb() mentioned in this article? Where I can find its
> definition?
Are you trying to write kernel code or user space code?
DS |
|
| Back to top |
|
 |
dbtouch External

Since: Jun 22, 2009 Posts: 3
|
Posted: Mon Jun 22, 2009 6:53 pm Post subject: Re: declaration of memory barrier function [Login to view extended thread Info.] Archived from groups: per prev. post (more info?) |
|
|
On Jun 22, 9:33 pm, David Schwartz <dav....TakeThisOut@webmaster.com> wrote:
> On Jun 22, 6:14 pm, dbtouch <dbto....TakeThisOut@gmail.com> wrote:
>
> > What about smp_mb() mentioned in this article? Where I can find its
> > definition?
>
> Are you trying to write kernel code or user space code?
>
> DS
I am trying to modify libpcap and I need memory barrier function.
dbtouch |
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
| |
|
|