lkml.org 
[lkml]   [2018]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: bpf: Change structure passing and assignment
On Sat, Jan 13, 2018 at 02:42:19PM +0200, Karim Eshapa wrote:
> I noticed that most of functions here have structure arguements and return structure, all these structures passed and returned are delt in passing and assignment like memcpy a structure.In addition it takes size in stack while passing. so why not we use pointers to structure as argumentsor there is actual need to do such things and you intentionaly want to deal with copies of strucuteres.
> ex:
> struct tnum tnum_add(struct tnum a, struct tnum b)

and how an alternative for the above would look like with pointers ?

\
 
 \ /
  Last update: 2018-01-14 23:26    [W:0.025 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site